Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   [SOLVED] Incorrect URLs Being Generated for Navigation Tabs on Index Pages (http://forum.bytesforall.com/showthread.php?t=22986)

CrouchingBruin Jan 2, 2015 09:30 AM

[SOLVED] Incorrect URLs Being Generated for Navigation Tabs on Index Pages
 
Scenario:
  • WP 4.1, Montezuma 1.2.4
  • Set permalinks to Default.
  • Do either a search or view a Category index page where the number of posts/results span across more than one index page.

Results:
Clicking on a navigation tab (Next, Prev, or any of the numbered tabs) on the navigation bar does not move you to another page. The URL changes, but the screen does not.

This behavior is not seen on a normal index (i.e., blog) page. It is also not seen on the TwentyFourteen theme.

Reason:
It appears that an incorrect URL is being generated for the tabs:
Code:

http://sandbox.geefamily.net/?cat=1#038;paged=2
Instead of the #038;, an ampersand should be output so the URL looks like this:
Code:

http://sandbox.geefamily.net/?cat=1&paged=2

juggledad Jan 2, 2015 10:16 AM

Interesting, I see it happening on your site, however it works fine on mine. Did you try disabling all plugins?

if it is not a plugin conflict, could you do an Montezuma export and attach it to a reply.

CrouchingBruin Jan 2, 2015 11:50 AM

Disabled all plugins, plus cleared out the Insert Code fields under MTO, and still have the problem.

I tried attaching my export file, but I guess I've run out of storage space for attachments, so it won't upload. I can't figure out how to delete my existing attachments. I tried going through User CP > Miscellaneous > Attachments, but there doesn't seem to be a way of deleting either of my two attachments. And I'm not able to go into the posts which included those attachments and delete them.

Anyway, you should be able to get my export in this Pastebin. If you scroll all the way down to the bottom of the page, it will be easier to copy the export from the RAW Paste Data field by clicking in the field and pressing Ctl-A to select the entire field.

Another user claimed that it worked OK under WP 4.0.1, before the upgrade to WP 4.1. I'm going to try & create another WP installation to see if I can verify that.

juggledad Jan 2, 2015 05:54 PM

Your settings work fine for me. I was running WP 4.0.1 and I upgraded to 4.1 and it still works fine.

juggledad Jan 2, 2015 06:16 PM

Could I get in and poke a bit? If so send me a PM with an admin ID/PW.

The code looks like it should work, but obviously something isn't correct and it could be anything even someting like 'magic quotes' being on

CrouchingBruin Jan 2, 2015 06:49 PM

Sent. On your test, you set the Permalinks to the Default style? Because that's where it fails, when permalinks is set to the Default style, not the other styles.

CrouchingBruin Jan 2, 2015 11:52 PM

So it looks like it's a problem that was introduced due to some change in Wordpress 4.1.

What I did was to create a fresh install of Wordpress 4.0. I used the plugin Demo Data Creator to create 25 test posts. This was the only plugin that was installed.

Then I installed, in sequential order, Montezuma version 1.2.2, 1.2.3, then 1.2.4, and tested each version using a search on the phrase lorem.

Then I upgraded Wordpress to 4.0.1 and repeated the above sequence of Montezuma versions.

Finally, I upgraded to Wordpress 4.1 and repeated the same sequence of Montezuma versions.

For Wordpress 4.0 & 4.0.1, all three versions of Montezuma created a correct URL for the navigation tab, although the link looked slightly different for release 1.2.2 versus 1.2.3/1.2.4.

Once Wordpress was upgraded to 4.1, all three versions failed. Looking at navigation tab 2, there seems to be a duplicate submit parameter being output with the escape sequence #038; preceding it instead of an ampersand:
Code:

Montezuma 1.2.2:
http://wp40.geefamily.net/?s=lorem&submit#038;submit&paged=2

Montezuma 1.2.3/1.2.4:
http://wp40.geefamily.net/?s=lorem&submit=search#038;submit=search&paged=2

For Category pages, the tab link doesn't put out a duplicate parameter, but the #038 escape character is being output instead of an ampersand:
Code:

http://wp40.geefamily.net/?cat=6#038;paged=2

juggledad Jan 3, 2015 04:03 AM

1 Attachment(s)
1) id/pw combo didn't work...but that's ok, I reproduced it
2) please try out this fix and see if you can break it - it was definately a change in some of the WP code that caused this. i was able to see how twentyfourteen did it and have implimented the code.

Replace the current ...themes/montezuma/includes/content_nav.php with the attached file (after unzipping it)

CrouchingBruin Jan 3, 2015 09:56 AM

Looks like it works, thanks very much. I'll pass along the info to the other user.


All times are GMT -6. The time now is 12:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.