Page 2 of 7
Posted: Mon Dec 20, 2004 7:22 pm
by garvinhicking
index.php - the "else" case where it emits a 404 header and then printf()s the DOCUMENT_NOT_FOUND message. That one can be removed, as it was in wrong layout already.
Regards,
Garvin
Posted: Mon Dec 20, 2004 7:34 pm
by Rembrandt
garvinhicking wrote:index.php - the "else" case where it emits a 404 header and then printf()s the DOCUMENT_NOT_FOUND message. That one can be removed, as it was in wrong layout already.
Regards,
Garvin
Ah, then I looked at the right section. Nice to know for the next time
Thx,
Rembrandt (a s9y user for two days)
Posted: Tue Dec 21, 2004 4:06 pm
by Rembrandt
Hmm, one (last) question: Why did you parse the URI in index.php? I thought, the URI will be rewritten in .htaccess?
so long...
Posted: Tue Dec 21, 2004 4:50 pm
by garvinhicking
The URI needs to be parsed because index.php is the ErrorDocument ApacheHandler. Internally we just catch 404 errors and then deliver the page which was originally requested, to provide the "pretty URLs". To stay compatible mod_rewrite uses the same mechanism but without reating a 404 error.
Regards,
Garvin.
Posted: Tue Dec 21, 2004 5:21 pm
by Rembrandt
Is there a possibility to avoid the 404-ResponseHeader (for my /static/"pagename" - problem) without inserting a match-rule in index.php?
so long...
Rembrandt
Posted: Tue Dec 21, 2004 5:49 pm
by garvinhicking
Yes, the plugin just needs to emit a header('HTTP 1/0. 200') by itself to override the previous 404 header...
So it must be changed in the plugin...
Regards,
Garvin.
Posted: Tue Dec 21, 2004 6:11 pm
by Rembrandt
garvinhicking wrote:Yes, the plugin just needs to emit a header('HTTP 1/0. 200') by itself to override the previous 404 header...
So it must be changed in the plugin...
Regards,
Garvin.
Done!
Before:
Code: Select all
function generate_content(&$title) {
$title = STATICPAGE_TITLE.' ('.$this->get_config('pagetitle').')';
(...)
}
After:
Code: Select all
function generate_content(&$title) {
header('HTTP/1.0 200');
$title = STATICPAGE_TITLE.' ('.$this->get_config('pagetitle').')';
}
And now it works. *g*
so long...
Rembrandt
PS: I've to take a close look to your plugin-api - seems to be very nice!
Posted: Thu Dec 30, 2004 2:31 am
by E. Bess
Hi there --
I posted a question about static pages over in the general forum and someone pointed me in the direction of this plugin. Yay!
There's only one problem: I don't see it showing up in the event plugins dropdown menu. Boo!
Any idea as to what the problem is? I thought that just sticking it in that directory would be enough to make it work, but perhaps there's something else I need to configure?
Also, if I want more than one static page, how would I accomplish that?
Thanks muchly. I'm diggin' Serendipity something fierce.
Posted: Thu Dec 30, 2004 2:58 am
by E. Bess
I should also add that I installed the plugin exactly as romulus said: unzipped the plugin into the plugins folder. I did notice that supposedly plugins are supposed to sport a "serendipity_" prefix while this one is named "romulus_". I tried renaming the folder and the file to reflect those conventions, but it didn't work (I got an error on my plugin administration page). I tried renaming the folder, file and name of the function in the file, but that didn't work either -- it still doesn't show up in the dropdown menu.
I really, really would love to use this plugin, so if you have any ideas, please let me know.
Thank you!
Oh! And I'm running the latest: 0.7.1 (just downloaded it today).
Posted: Thu Dec 30, 2004 1:57 pm
by E. Bess
Ah -- permissions problem. Works totally fine.
Man, I must've been asleep at the wheel last night....
Posted: Fri Jan 07, 2005 10:13 pm
by veggie2u
I have serendipity .7 with the .3 version of the static plugin.
I can configure the plugin, but when I try to goto the page, it is just blank. If I try to goto a page not created, it returns me to the blog, so it appears like the plugin is doing somehting, just not returning the text for the static page.
Any ideas?
veggie2u
Posted: Sat Jan 08, 2005 3:31 pm
by garvinhicking
Veggie: Do you have a URL to the page where it doesn't work? By .3 version, do you mean the latest version of our CVS additional_modules? You should use that one...
Regards,
Garvin
Posted: Mon Jan 10, 2005 2:09 am
by veggie2u
I am not using CVS. I am a coder for a living, and my groups CVS code is far from stable

I can try the cvs version though.
By version .3, I meant the one I downloaded off the s9y site under plugins just a couple of days ago. Inside the script is says version .3
You can see the page I tried to get working here:
http://www.cyberward.net/blog/index.ph ... =testPage
I am not certain I have the mod_rewrite working yet. Once I have the url's above working, I will get the /blog/static/testPage to work.
veggie2u
Posted: Mon Jan 10, 2005 10:44 am
by garvinhicking
Please try to download
http://cvs.sourceforge.net/viewcvs.py/p ... taticpage/
and try it with the CVS version; I think it may work there.
Regards,
Garvin
Posted: Tue Jan 11, 2005 4:21 am
by veggie2u
I guess I am not sure where I found the version of .3. Anyway, I installed the cvs version called 1.3. I did a diff :
Code: Select all
diff serendipity_event_staticpage.php serendipity_event_staticpage_cvs.php
100a101,104
> if (!headers_sent()) {
> header('HTTP/1.0 200');
> }
>
Not much different. Anyway, same result. I tried to make another page, called "chris". Same thing.
I am using .7 of serendipity, should I try a different version?