SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    May 2012
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Weird wordpress case issue

    I created a Wordpress (3.4.1) site on my local server which works fine (if not complete). I transferred the theme files over to the new server (which is located in Russia, which may be significant here) and one of the theme pages doesn't seem to be accessible via the lowercase slug - only when I use uppercase.

    This is easier to show than explain:

    This works: http://www.tnc-branding.com/wordpress/Clients/

    and this works: http://lisadearaujo.com/clientaccess...press/clients/ - update, no it doesn't now that I've updated wordpress...

    This does not: http://www.tnc-branding.com/wordpress/clients/

    The odd thing is that the theme templates are the same and the slug on the new site (in wordpress) is lowercase so is also the same. Why in the world can I only access this page when I change "clients" in the url to "Clients"? The lowercase is what's generated by wordpress as well so I can't just use the uppercase url.

    What could possibly cause this? What could I possibly have missed?

    FYI, I'm also using the qtranslate plugin.

    EDIT: Damn, just updated my server's site to the newest version of wordpress and I'm getting the same issue now on my version.
    Last edited by yolise; Aug 9, 2012 at 06:07. Reason: new information

  2. #2
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,996
    Mentioned
    219 Post(s)
    Tagged
    12 Thread(s)
    This is indeed weird behaviour.
    By default WP should format and lowercase all slugs with the function sanitize_title_with_dashes().

    You mentioned you have qtranslate installed.
    Do you also maybe have Qtranslate Slug installed, too?
    As you probably know, this lets you translate slugs. Maybe this got broke in the upgrade?

    Alternatively, sanitize_title_with_dashes() is called via a filter, so maybe you could unhook it and see if the problem persists.
    Code PHP:
    remove_filter( 'sanitize_title', 'sanitize_title_with_dashes' );

  3. #3
    SitePoint Member
    Join Date
    May 2012
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I uninstalled qTranslate and all other plugins when testing this. I had never installed qTranslate Slug (though I might now - sounds interesting).

    What I've now determined is this:

    I was calling custom post types into the page and both the page slug and the custom post type slug were the same (I was attempting to use the custom post type slug argument to build a specific url structure). I can see how doing it this way would confuse things, but of course it worked fine in 3.4.0 so I didn't really look for another way of doing this. The fact that you can access the page with the uppercase slug is still a bit odd, however - not sure why that even works!

    My new solution is to use parent pages within the custom post types to create my url structures, which was probably the right way to do it in the first place, but live and learn.

    Sadly, I've used the other technique on more than one site, so I've got to rebuild things before my clients start updating!

    Thanks for replying though!

  4. #4
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,996
    Mentioned
    219 Post(s)
    Tagged
    12 Thread(s)
    Glad you got it sorted.
    God luck with rebuilding your other sites


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •