Static pages broken on upgrade

Creating and modifying plugins.
Post Reply
IMS_Scott
Regular
Posts: 6
Joined: Fri Jan 23, 2009 6:31 pm

Static pages broken on upgrade

Post by IMS_Scott »

I just went in and checked for plugin upgrades, as I do from time to time, and noticed there was one available for the Static Pages plugin. I went ahead and clicked on it to upgrade, which it did successfully without producing any errors. The new version is 3.78 (I didn't notice what the old one was before I pulled the trigger). Everything in the creation and editing seems to work properly, but none of my static pages show up anymore!

I can go in and create new static pages, and they do display using the permalink URL (index.php?/pages/example.html). They do not, however, show up in sidebar navigation even when they are checked to do so. The old ones do show in the sidebar navigation, but when clicking on them, I simply get the main blog page displayed (just as if I had gone to index.php?frontpage, even though the URL in the address bar reads with the correct permalink URL). All the settings in the static page entry editor (aside from the addresses) are identical between the old entries and the new ones.

I have not tried re-creating the old pages entirely with the same permalinks, which seems like it might work, but that would be a lot of work that I would rather not have to do to get things to display again. Also, it doesn't fix how I might add new items to the sidebar for navigation in the future, since that doesn't seem to work with new additions.

Can anyone tell me what is going on, or if not, how I might be able to roll back to the old static pages plugin that was working properly?

Thanks!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Static pages broken on upgrade

Post by garvinhicking »

Hi!

That sounds pretty odd. Do you use MySQL? Are you able to check the serendipity_staticpage database table to compare the "old" and "new" entries?

I can only suppose that some hidden/visible flag is not properly triggered and read out, though this is the first time I hear of such a problem.

Maybe you can check if you can use the "fallback URL", like index.php?serendipity[subpage]=XXX, where "XXX" stands for the "Static Page Title" that you entered.

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
IMS_Scott
Regular
Posts: 6
Joined: Fri Jan 23, 2009 6:31 pm

Re: Static pages broken on upgrade

Post by IMS_Scott »

Hi Garvin,

Thanks for the tip, I think I can fix it now.

The fallback URL option doesn't work either, it returns a page that just says "No entries to print."

When I compare the entries in the db, the only difference seems to be that with all the old ones, the permalink field format follows the display URL format: /index.php?/pages/example.html

With the new entries, the permalink is stored simply as: /pages/example.html

I find that if I change the old entry permalink format to match the new ones, they once again show up on the site, even though the URL shown is the same as it ever was: http://example.net/index.php?/pages/example.html

I assume something in the plugin code now automatically adds the "/index.php?" and so when that is duplicated in the string it gets from the database, it leads to the wrong path.

I haven't tested to see whether there is any way to get the new entries to show up in the sidebar navigation but that's a secondary concern since I have got the old ones working again.

Thanks for the help!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Static pages broken on upgrade

Post by garvinhicking »

Hi!

Could it be you enabled "URL Rewriting" in your s9y configuration? Do your normal blog archive URLs look like index.php?/archives, or just /archives/...?

Also, which s9y version are you using?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
IMS_Scott
Regular
Posts: 6
Joined: Fri Jan 23, 2009 6:31 pm

Re: Static pages broken on upgrade

Post by IMS_Scott »

You know, after a previous discussion (http://board.s9y.org/viewtopic.php?f=2& ... 875#p95875) I thought I had turned URL rewriting off for good, but when I went and checked it, sure enough, it was in fact turned on again. If I turn it off, both the old and new static pages appear as expected.

Oddly enough, even with mod_rewrite on, my archive URLs appeared as index.php?/archives, not simply /archives/. So it seems that it wasn't working correctly anyway.

I'm currently running version 1.4.1.
Post Reply