Forums

[resolved] Changing permalinks to /%postname%/ creates mysterious problems (8 posts)

  1. br73mg
    Member
    Posted 5 months ago #

    Losing my mind...

    Is it possible that changing permalinks could affect javascript files used in my theme? If so how?

    The Setup:
    -I am running 3.3 - but the problem existed with the previous version
    -When permalinks are set to default, entire site works beautifully
    -Linux server on Host Monster (first time using this host...)

    The Problems:
    -The javascript for the main nav only fully works on the home page. The top level items appear on interior pages, but no dropdown items
    -One interior page with a custom template containing a hardcoded slider loads text content, but no images, styles or javascript (it seems)...
    -The two items above both pull scripts from a "js" directory within the theme. Must be the problem, right? Nope. The home page has a hardcoded slider that is also pulling it's script from the same directory - it works fine.

    What I have Confirmed:
    -Confirmed that my htaccess file is writable (permissions is set to 666)
    -Confirmed that the necessary code is being generated in the htaccess when permalinks are changed
    -Confirmed that my htaccess file is in the correct location
    -Created a new menu through the appearance>menus section after permalinks were changed.
    -Disabled ALL plugins to see if there were conflicts - none.

    It is worth noting that while each page is accessible, the entire site is slugish with pretty permalinks.

    Any help is greatly appreciated. If I can't figure it out, I will somehow need to explain why "?page_id=1243" is better than "about-us."

  2. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 5 months ago #

    That's ... odd since %postname% actually works BETTER on 3.3 than it ever did before. Can you flush your server cache?

    What theme is this?

  3. br73mg
    Member
    Posted 5 months ago #

    I know! That was a glimmer of hope when I saw the update...

    Server cache has been flushed. No change.

    The theme is adapted from 2010. I have done some light frontend work on it.

  4. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 5 months ago #

    2010 got upgraded recently... Can you try with 2010 au natural?

  5. br73mg
    Member
    Posted 5 months ago #

    Tried it with an un-updated 2010 and the permalinks work fine. Site is quick, all the sub nav links appear. So, I can conclude that my theme is to blame. Problem is, I'm not sure where to start. What about changing the permalinks settings would mess with the js or CSS of the theme?

  6. br73mg
    Member
    Posted 5 months ago #

    I ended up coding the full url paths (http://site.com/css/style.css) to the styles and js in the head.php file. Seems to have fixed all the issues. Oddly, changing the permalinks forced the current page's identifier (e.g. "about-us") to the front of all the linked resources. SOOOOO.... instead of looking for http://site.com/css/style.css, the page was looking for http://site.com/about-us/css/style.css. Interesting...

  7. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 5 months ago #

    Were the old paths /css/style.css with that leading slash?

  8. br73mg
    Member
    Posted 5 months ago #

    I had them as /wp-conent/themes/themename/css/style.css

Reply

You must log in to post.

About this Topic