static page plugin

Creating and modifying plugins.
bobdavis
Posts: 4
Joined: Sat Jun 11, 2005 12:14 am
Location: Berkeley, CA
Contact:

Indeed....

Post by bobdavis »

Yes, that could be the problem.

However, I am not able to upgrade the program, as I am on a shared server (godaddy.com) and they don't allow uploading of blog software. They loaded serendipity on for me, and apparently they are using the old software.

In the meantime, I cannot fix this problem. Is there some way to delete the plugins and revert serendipity so that it works? i.e. is there a file in there I need to edit?

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

Re: Indeed....

Post by garvinhicking »

If you do not have FTP access to your blog directory, there is no way you can get an old staticpage version, I'm really sorry.

Please ask the godaddy admins to upgrade to serendipity 0.8.1...

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/
davecjr
Regular
Posts: 167
Joined: Fri Oct 29, 2004 3:09 pm
Contact:

Post by davecjr »

I just went from version 2.1 to 2.3 of the static page plugin and it's not showing my static pages that were done before in the list of static pages to allow editing. I can recreate so it isn't a big deal but thought it would show up. Probably a stupid question, but can I go back to 2.1? :(
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Dave, hm that shouldn't be. Can you look in your serendipity_staticpages table if the static pages are still there?

If they are, then there's a bug in the plugin which I'd like to fix!

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/
davecjr
Regular
Posts: 167
Joined: Fri Oct 29, 2004 3:09 pm
Contact:

Post by davecjr »

It is still in the table and I can access it through my blog, just not the the admin side to edit it. Thanks for checking so fast!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Okay, so then it's just a wrong query I guess which can be fixed easily.

Tell me, do you see the dropdown of available static pages when you click on the link "Maintain static pages"? If you get no dropdown, could you edit the file and look for:

Code: Select all

    function &fetchStaticPages() {
        global $serendipity;

        return serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}staticpages ORDER BY page");
    }
edit that to:

Code: Select all

    function &fetchStaticPages() {
        global $serendipity;

        $q = "SELECT * FROM {$serendipity['dbPrefix']}staticpages ORDER BY page";
        echo "Q: " . $q . "<br />";
        $res = serendipity_db_query($q);
        print_r($res),
        return $res;
    }
Then you should get some debug output...?!
# 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/
davecjr
Regular
Posts: 167
Joined: Fri Oct 29, 2004 3:09 pm
Contact:

Post by davecjr »

I do get a drop down that says 'New Entry' and '-------------------' and that's it. It just doesn't list the static page I already created.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Okay, so could you modify the function I pasted? It should then give you some debug output (but that may only appear in the HTML output, I don't know)

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/
davecjr
Regular
Posts: 167
Joined: Fri Oct 29, 2004 3:09 pm
Contact:

Post by davecjr »

I hate to say but that file seems to be owned by httpd and not me! I can't delete it, rename it, or modify it. Not until I figure a way around that anyway! :?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Okay, that's not hard. Just write a PHP script:

Code: Select all

<?php
chmod('plugins/serendipity_event_staticpage/serendipity_event_staticpage.php', 0777);
?>
and execute that file; it will then set write permissions on the staticpage file.

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/
drift82

Changing the Page Title

Post by drift82 »

Maybe I'm crazy but when I use the static page plugin, it looks like the page title is just the name of my blog (Your Next Broker). Is there anyway to get the static pages to have a different HTML page title? (I.e. the <title> tags)?

Thanks,
Eric
davecjr
Regular
Posts: 167
Joined: Fri Oct 29, 2004 3:09 pm
Contact:

Post by davecjr »

Thanks for helping me out Garvin, as always. I ended up just recreating the page since I only had one to do. :lol:

I am using the Guestbook plugin. Should it show up in the Static Page List with the sidebar plugin?
gwilsonmail
Regular
Posts: 146
Joined: Tue Jul 12, 2005 9:12 pm
Location: Ottawa, Canada
Contact:

Post by gwilsonmail »

[1] Is it possible to add a link (not a link to a static page) by using the static pages plugin?

[2] How do I change the text "frontpage" to "Home" (say). Which is a link that is listed first in the list of pages!
gw
gwilsonmail
Regular
Posts: 146
Joined: Tue Jul 12, 2005 9:12 pm
Location: Ottawa, Canada
Contact:

Post by gwilsonmail »

davjcr talked about losing static pages. As it turns out it really happens!

If you install the plugin and configure it AND then the owner or permissions are changed so that the next time you make some call to the website, configure plugins or something else ( :roll: ) then the permissions are incorrect and things go wrong.

If a light bulb goes on in your head (maybe 6 hrs later) and you realise it might be the permissions and you change the ownership/permissions so that things should work then the following happens

- the sidebar plugin presents a list of your pages (but the links don't work!)
- the sidebar plugin can be configured
- there is no event plugin listed
- there is no static pages entry in the admin suite.

The pages can be restored as I mention below. But it would be a great advantage if the staticpages plugin did not decide to uninstall itself because of this error. Other plugins might also act this way.

ownership/permissions settings are a real problem for sites with virtual hosting. s9y creates plugin directories within /plugins. Unfortunately a virtual host will create this directory with apache as the owner not the siteowner. This is not a problem initially because the plugins work. However its a real serious problem if you want to review the plugin or change something (like a .css or language file). You can't even look inside the directory - you don't own it! You can't even update it or remove it!

Solution - ask your ISP to change the ownership from apache to the siteowner. And that's where the problem seems to start. You own the directories but the permissions were not set up for php execution or for write access. You need to chmod the plugin directories to 777.

At this point the pages look as if they are lost but reinstalling the staticpages event plugin restores the "lost" static pages. The sidebar plugin should still be installed.
gw
MySchizoBuddy
Regular
Posts: 340
Joined: Sun Jun 12, 2005 5:28 am

Post by MySchizoBuddy »

Where is this pages/about.html file created. In which directory.
Do i need to manually create the pages directory first. I can see my about entry under the drop down menu, but where is the file.:?
Post Reply