[wp-testers] Redirection problem with tags ending in 'p'

Paul Robinson pablorobinson at gmail.com
Sat Nov 8 01:07:09 GMT 2008


Well my regex is a little rusty but I think that says replace all instances
of p, page_id, cat or tag with nothing on the redirect query. To stop the
problem you could probably just remove the p so it would say:

$redirect['query'] = preg_replace( '#&?(page_id|cat|tag)=?$#',
'',$redirect['query'] );

It should fix it. It's a good idea to file a bug though. Give that a try if
your feeling adventurous to see if it fixes it. :D

Paul.

2008/11/8 Trevor Fitzgerald <fitztrev at gmail.com>

> I found where the problem is occurring:  Line #207 of wp-inc/canonical.php
>
> $redirect['query'] = preg_replace( '#&?(p|page_id|cat|tag)=?$#',
> '',$redirect['query'] );
>
> I am not entirely sure what else the line accomplishes so I won't try to
> change the regex out of fear of breaking something else.
>
> Nevertheless, I will file a bug report and hopefully somebody else can
> attach a patch.
>
> On Fri, Nov 7, 2008 at 7:36 PM, DD32 <wordpress at dd32.id.au> wrote:
>
> > It only affects ?tag=....p, not the permalinks.. Which is odd.. I'll see
> if
> > i can trace it..
> >
> >
> > On Sat, 08 Nov 2008 11:33:50 +1100, Paleo Pat <tpblogeditor at gmail.com>
> > wrote:
> >
> >  Nope. I click on the tag I created  and it went to the URL
> >>
> >> http://www.politicalbyline.com/tag/thump/
> >>
> >>
> >>
> >> -Paleo Pat
> >> http://www.politicalbyline.com
> >>
> >>
> >>
> >>
> >> On Fri, Nov 7, 2008 at 7:23 PM, Steve <stevish at gmail.com> wrote:
> >>
> >>  Do you have any tags that END in the letter "P"? That is what seems to
> be
> >>> causing the problems...
> >>>
> >>> On Fri, Nov 7, 2008 at 5:16 PM, Paleo Pat <tpblogeditor at gmail.com>
> >>> wrote:
> >>>
> >>> > Not happening here... I clicked on my Blogs most used tag Politics...
> >>> and
> >>> > everything works just fine. :)
> >>> >
> >>> >
> >>> >
> >>> > -Paleo Pat
> >>> > http://www.politicalbyline.com
> >>> >
> >>> >
> >>> >
> >>> >
> >>> > On Fri, Nov 7, 2008 at 7:12 PM, Steve <stevish at gmail.com> wrote:
> >>> >
> >>> > > I have had a chance to test tags ending in every letter, and they
> all
> >>> > > worked. I also tried several tags ending in "p" (tip, tap, top, and
> >>> > > macedoniap), and I was always redirected to a page for the tag
> >>> without
> >>> > the
> >>> > > "p" on the end. Capitol (capital?) P's seem to behave the same way.
> >>> > >
> >>> > > On Fri, Nov 7, 2008 at 4:57 PM, Steve <stevish at gmail.com> wrote:
> >>> > >
> >>> > > > I can confirm this problem using 2.7b2 on ff 3.0.3... what a
> >>> strange
> >>> > > > strange bug... I will now test every ending letter to see if it's
> >>> > limited
> >>> > > to
> >>> > > > "p"
> >>> > > >
> >>> > > >
> >>> > > > On Fri, Nov 7, 2008 at 3:46 PM, Steve <stevish at gmail.com> wrote:
> >>> > > >
> >>> > > >> Now THAT is a pretty cool bug... I can't help or anything... I
> >>> just
> >>> > > wanted
> >>> > > >> to say that that would be the kind of bug I would program in on
> >>> > purpose
> >>> > > just
> >>> > > >> to mess with people.
> >>> > > >>
> >>> > > >> However, since I'm posting, I will dig around in the source code
> >>> and
> >>> > see
> >>> > > >> if I can find where that url is built...
> >>> > > >>
> >>> > > >>
> >>> > > >> On Fri, Nov 7, 2008 at 3:12 PM, Trevor Fitzgerald <
> >>> fitztrev at gmail.com
> >>> > > >wrote:
> >>> > > >>
> >>> > > >>> For any of the tags I add that end in a 'p', I'm getting a
> >>> > redirection
> >>> > > >>> problem when I try to visit the tag archive page.
> >>> > > >>>
> >>> > > >>> http://localhost/?tag=tip is redirecting me to
> >>> > > http://localhost/?tag=ti
> >>> > > >>>
> >>> > > >>> Strange behavior considering all the other tags work fine.  I
> >>> have
> >>> > > tried
> >>> > > >>> to
> >>> > > >>> hunt it down but to no avail.
> >>> > > >>>
> >>> > > >>> Trevor Fitzgerald
> >>> > > >>> _______________________________________________
> >>> > > >>> wp-testers mailing list
> >>> > > >>> wp-testers at lists.automattic.com
> >>> > > >>> http://lists.automattic.com/mailman/listinfo/wp-testers
> >>> > > >>>
> >>> > > >>
> >>> > > >>
> >>> > > >
> >>> > > _______________________________________________
> >>> > > wp-testers mailing list
> >>> > > wp-testers at lists.automattic.com
> >>> > > http://lists.automattic.com/mailman/listinfo/wp-testers
> >>> > >
> >>> > _______________________________________________
> >>> > wp-testers mailing list
> >>> > wp-testers at lists.automattic.com
> >>> > http://lists.automattic.com/mailman/listinfo/wp-testers
> >>> >
> >>> _______________________________________________
> >>> wp-testers mailing list
> >>> wp-testers at lists.automattic.com
> >>> http://lists.automattic.com/mailman/listinfo/wp-testers
> >>>
> >>>  _______________________________________________
> >> wp-testers mailing list
> >> wp-testers at lists.automattic.com
> >> http://lists.automattic.com/mailman/listinfo/wp-testers
> >>
> >>
> >
> > _______________________________________________
> > wp-testers mailing list
> > wp-testers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-testers
> >
> _______________________________________________
> wp-testers mailing list
> wp-testers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-testers
>


More information about the wp-testers mailing list