Page 1 of 1

Static pages broken on upgrade

Posted: Mon Oct 18, 2010 2:32 am
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!

Re: Static pages broken on upgrade

Posted: Mon Oct 18, 2010 10:36 am
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

Re: Static pages broken on upgrade

Posted: Mon Oct 18, 2010 5:41 pm
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!

Re: Static pages broken on upgrade

Posted: Mon Oct 18, 2010 7:53 pm
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

Re: Static pages broken on upgrade

Posted: Tue Oct 19, 2010 1:46 am
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.