Static Pages not linking
Static Pages not linking
Hi everyone,
I've installed the static pages plugin on my site and created a single entry to link to the "About" section but so far every link at the top of the page simply reloads to the main (start) page instead.
In the TPL file for the theme ("leaf" in this case) I verified the path to the HTML file that it should be linking to: index.php?/pages/about.html
I create the static page with the same page name, and published it (usign the static page interface in the administration section). Nothing. I tried updating the path in case it maybe wasn't reading it correctly. I tried an absolute path from the root of the webserver, a relative path, a web path, and no path (except for the "index.php?..."). Nothing. I checked the database via phpMyAdmin to ensure the entry was there (it was), checked permissions on all files and directories, cleared my browser cache, and reloaded. Nothing. I tried it in FireFox and IE on two different computers. Still nothing.
These pages are not absolutely necessary and I'll remove them if I can't get them up and running, but I'm willing to try any suggestions you may have. I'm an experienced PHP developer (I do Flash/PHP development for a living and am well-versed in object-oriented PHP) - so feel free to drop technical suggestions as well.
Many thanks for your time!
Patrick
I've installed the static pages plugin on my site and created a single entry to link to the "About" section but so far every link at the top of the page simply reloads to the main (start) page instead.
In the TPL file for the theme ("leaf" in this case) I verified the path to the HTML file that it should be linking to: index.php?/pages/about.html
I create the static page with the same page name, and published it (usign the static page interface in the administration section). Nothing. I tried updating the path in case it maybe wasn't reading it correctly. I tried an absolute path from the root of the webserver, a relative path, a web path, and no path (except for the "index.php?..."). Nothing. I checked the database via phpMyAdmin to ensure the entry was there (it was), checked permissions on all files and directories, cleared my browser cache, and reloaded. Nothing. I tried it in FireFox and IE on two different computers. Still nothing.
These pages are not absolutely necessary and I'll remove them if I can't get them up and running, but I'm willing to try any suggestions you may have. I'm an experienced PHP developer (I do Flash/PHP development for a living and am well-versed in object-oriented PHP) - so feel free to drop technical suggestions as well.
Many thanks for your time!
Patrick
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Static Pages not linking
Hi!
So I understand you right that the staticpage itself does not show up, when you call "index.php?/pages/about.html", right?
Can you tell us which options/radiobuttons you set for that 'about' staticpage? Maybe if you chose a different language, or saved the article as "draft" it might not display on the frontpage. Best would be if you could supply a screenshot of how your static page admin section for that page looks like?
Best regards,
Garvin
So I understand you right that the staticpage itself does not show up, when you call "index.php?/pages/about.html", right?
Can you tell us which options/radiobuttons you set for that 'about' staticpage? Maybe if you chose a different language, or saved the article as "draft" it might not display on the frontpage. Best would be if you could supply a screenshot of how your static page admin section for that page looks like?
Best 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/
# 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/
Re: Static Pages not linking
Exactly. It doesn't show up either as a link from the main page or when called directly. You can see the blog at http://www.peabee.com/bloggarvinhicking wrote:Hi!
So I understand you right that the staticpage itself does not show up, when you call "index.php?/pages/about.html", right?
Sure. Here's a screenshot of the settings (these have been saved like this):garvinhicking wrote:Can you tell us which options/radiobuttons you set for that 'about' staticpage? Maybe if you chose a different language, or saved the article as "draft" it might not display on the frontpage. Best would be if you could supply a screenshot of how your static page admin section for that page looks like?
I'm not putting in any special content until I can get this worked out so this is all I have for now. Do you see anything out of place? I can post screencaps of anything else you think may be incorrect.
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Static Pages not linking
Hi!
Okay. I can call up the staticpage using the "about" key you configured that's used as a "fallback" mechanism:
http://www.peabee.com/blog/index.php?se ... age]=about
This tells us at least your staticpage CAN be displayed and IS properly stored. The only thing we have to figure out is why the permalink itself does not work.
Can you check:
1. What exactly you entered in the permalink? I assume it's "/blog/index.php?/pages/about.html"?
2. In your s9y configuration, what did you set the "URL Rewriting" method to? If you set it something other than "None", try to use a permalink like "/blog/pages/about.html"
3. Can you check the serendipity_staticpages DB table and see if you have more than one DB entry for the ".../pages/about.html" entry?
HTH,
Garvin
Okay. I can call up the staticpage using the "about" key you configured that's used as a "fallback" mechanism:
http://www.peabee.com/blog/index.php?se ... age]=about
This tells us at least your staticpage CAN be displayed and IS properly stored. The only thing we have to figure out is why the permalink itself does not work.
Can you check:
1. What exactly you entered in the permalink? I assume it's "/blog/index.php?/pages/about.html"?
2. In your s9y configuration, what did you set the "URL Rewriting" method to? If you set it something other than "None", try to use a permalink like "/blog/pages/about.html"
3. Can you check the serendipity_staticpages DB table and see if you have more than one DB entry for the ".../pages/about.html" entry?
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/
# 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/
Re: Static Pages not linking
Okay, good to know.garvinhicking wrote:Hi!
Okay. I can call up the staticpage using the "about" key you configured that's used as a "fallback" mechanism:
http://www.peabee.com/blog/index.php?se ... age]=about
This tells us at least your staticpage CAN be displayed and IS properly stored. The only thing we have to figure out is why the permalink itself does not work.
It's exactly "/~patrickb/peabee/blog/index.php?/pages/about.html" which is the direct link from the root folder of my server.garvinhicking wrote: Can you check:
1. What exactly you entered in the permalink? I assume it's "/blog/index.php?/pages/about.html"?
URL rewriting is currently disabled.garvinhicking wrote: 2. In your s9y configuration, what did you set the "URL Rewriting" method to? If you set it something other than "None", try to use a permalink like "/blog/pages/about.html"
From what I can see there's only one entry for this. I exported the table to the following PDF file http://www.peabee.com/images/entries.pdfgarvinhicking wrote: 3. Can you check the serendipity_staticpages DB table and see if you have more than one DB entry for the ".../pages/about.html" entry?
Thanks for your quick replies, BTW, much appreciated.
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Static Pages not linking
Hi!
Best regards,
Garvin
There we have it! It should be "/blog/index.php?/pages/about.html" because you need to enter the full HTTP path there, not a filesystem path.It's exactly "/~patrickb/peabee/blog/index.php?/pages/about.html" which is the direct link from the root folder of my server.
Best 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/
# 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/
Re: Static Pages not linking
I tried that as well (as I mentioned in the first message), but I'll try that right now again just to verify.garvinhicking wrote:Hi!
There we have it! It should be "/blog/index.php?/pages/about.html" because you need to enter the full HTTP path there, not a filesystem path.It's exactly "/~patrickb/peabee/blog/index.php?/pages/about.html" which is the direct link from the root folder of my server.
Setting to : "/blog/index.php?/pages/about.html"...
... and no change. I also tried "http://peabee.com/blog/index.php?/pages/about.html". I verified in phpMyAdmin: the permalink column is now "/blog/index.php?/pages/about.html". Initially I had suspected that this was the problem as well but it seems to be having no effect.
What else do you think could be causing this?
P.S. I re-exported the table to this PDF file: http://www.peabee.com/images/entries2.pdf
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Static Pages not linking
Hi!
That's pretty strange. Since you volunteered for some PHP debugging, let's have a stab at that. The most probable problem might be related to some other event plugin interfering - which ones do you have installed, in what order?
The permalink lookup is performed in the serendipity_event_staticpage.php file. Serendipity calls the plugin API hook 'genpage' before it displays the output.
The plugin checks that hook in the PHP file at around line 2143, where it reads "case 'genpage':...".
What the code does is to check the URI arguments, paste it into a $nice_url value, perform some check and pass the result into $serendipity['GET']['subpage']. Remember that variable? It's the one we already had access to your blog - so ideally, this variable will need to hold the permalink of your staticpage. This value is then compared in the database by calling the "$this->selected()" method.
So to debug that you could check the contents of those variables. there are other plugins that might set the variable, rendering the staticpage plugin unable to perform any more lookups. You usually can fix this by re-arranging the event plugins.
You might want to look into other plugins that you are using to see which one of them tries to get a hold of the 'subpage' variable and renders it useless...
HTH,
Garvin
That's pretty strange. Since you volunteered for some PHP debugging, let's have a stab at that. The most probable problem might be related to some other event plugin interfering - which ones do you have installed, in what order?
The permalink lookup is performed in the serendipity_event_staticpage.php file. Serendipity calls the plugin API hook 'genpage' before it displays the output.
The plugin checks that hook in the PHP file at around line 2143, where it reads "case 'genpage':...".
What the code does is to check the URI arguments, paste it into a $nice_url value, perform some check and pass the result into $serendipity['GET']['subpage']. Remember that variable? It's the one we already had access to your blog - so ideally, this variable will need to hold the permalink of your staticpage. This value is then compared in the database by calling the "$this->selected()" method.
So to debug that you could check the contents of those variables. there are other plugins that might set the variable, rendering the staticpage plugin unable to perform any more lookups. You usually can fix this by re-arranging the event plugins.
You might want to look into other plugins that you are using to see which one of them tries to get a hold of the 'subpage' variable and renders it useless...
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/
# 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/
Re: Static Pages not linking
Okay, here they are in order:garvinhicking wrote:Hi!
That's pretty strange. Since you volunteered for some PHP debugging, let's have a stab at that. The most probable problem might be related to some other event plugin interfering - which ones do you have installed, in what order?
1. [C] Markup: Serendipity
version: 1.3
2. [C] Markup: Emoticate
version: 1.4
3. [C] Markup: NL2BR
version: 1.7
4. Browser Compatibility
version: 1.1
5. [C] Spam Protector
version: 1.61
6. [C] Spartacus
version: 2.9
7. Spam Protector (SURBL)
version: 1.1
8. [C] Autosave entries
version: 0.2.2
9. [C] Tooltips
version: 1.4
10. [C] Links to next/previous entry
version: 1.32
11. [C] Fix common XHTML errors
version: 1.5
12. Livesearch
version: 1.4
13. [C] Typeset/Extended Buttons for non-WYSIWYG editors
version: 0.8
14. [C] User Profiles
version: 0.20
15. [C] Contact Form
version: 1.10
16. [C] Options for trustworthy editing on multi-user blogs
version: 0.2
17. [C] Announce entries
version: 1.07
18. [C] Statistics
version: 1.44
19. Post via XML-RPC
version: 1.26
20. [C] Static Pages
version: 3.41
21. [C] Extended properties for entries
version: 1.13
Static pages was among the first items installed and I couldn't get it working correctly from the start.
Okay, that sounds reasonable. I'll check out that section of code to see what's being stored. If it's not what's expected, I'll trace the calls back/forward a little to see if it's losing the value mid-stream (within the plugin). If this is not the case then I'll work on the assumption that another plugin is manipulating the values and try re-arranging them.garvinhicking wrote: The permalink lookup is performed in the serendipity_event_staticpage.php file. Serendipity calls the plugin API hook 'genpage' before it displays the output.
The plugin checks that hook in the PHP file at around line 2143, where it reads "case 'genpage':...".
What the code does is to check the URI arguments, paste it into a $nice_url value, perform some check and pass the result into $serendipity['GET']['subpage']. Remember that variable? It's the one we already had access to your blog - so ideally, this variable will need to hold the permalink of your staticpage. This value is then compared in the database by calling the "$this->selected()" method.
So to debug that you could check the contents of those variables. there are other plugins that might set the variable, rendering the staticpage plugin unable to perform any more lookups. You usually can fix this by re-arranging the event plugins.
We're thinking the same thing. Okay, I'll have a look and get back to you. Thanks again.garvinhicking wrote: You might want to look into other plugins that you are using to see which one of them tries to get a hold of the 'subpage' variable and renders it useless...
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Static Pages not linking
Hi!
The Contact Form is my quite safe bet. Try to move it AFTER the static page plugin in the order.
HTH,
Garvin
The Contact Form is my quite safe bet. Try to move it AFTER the static page plugin in the order.
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/
# 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/
Re: Static Pages not linking
One quick question: I'm not familiar with Serendipity behind the scenes but I'm assuming that "Event" plugins are actually trigerred via events, is that correct? If so, I should be able to hook up my own listener for event broadcasts as well, is that right?
Re: Static Pages not linking
No luck. I put Static Pages quite high in the list and Contact Form right at the bottom. I also tried removing it (it's gone now) but with no effect.garvinhicking wrote:Hi!
The Contact Form is my quite safe bet. Try to move it AFTER the static page plugin in the order.
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Static Pages not linking
Hi!
Dang, that's too bad, I really hoped the contact form would cause it.
So did you already have the chance to check what $serendipity['GET']['subpage'] is being set to in the staticpage plugin? You could emit those variables for debugging via a header() call and view them using firefox extensions like LivEHTTPHeaders. So you don't need to echo them to destroy the layout.
About the Event things: Yes, s9y has a event calling routine. You can build your own plugins that "listen" on that event and are executed if the event is fired.
Best regards,
Garvin
Dang, that's too bad, I really hoped the contact form would cause it.
So did you already have the chance to check what $serendipity['GET']['subpage'] is being set to in the staticpage plugin? You could emit those variables for debugging via a header() call and view them using firefox extensions like LivEHTTPHeaders. So you don't need to echo them to destroy the layout.
About the Event things: Yes, s9y has a event calling routine. You can build your own plugins that "listen" on that event and are executed if the event is fired.
Best 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/
# 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/
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi Jacobkell!
Please do not post such completely different questions into an existing thread. Make a new one, and I'll answer.
Regards,
Garvin
Please do not post such completely different questions into an existing thread. Make a new one, and I'll answer.
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/
# 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/