Static Pages Plugin doesn't show my added entries.

Found a bug? Tell us!!
Post Reply
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Static Pages Plugin doesn't show my added entries.

Post by blog.brockha.us »

I hope this is no "user too stupid" problem. I downloaded the static pages plugin using Spartacus.

So well.. I have no documentation on this plugin so I started creating my first static page. I changed the Permalink, choosed an "Article" static page, changed titles and content and after this, I saved.

Selecting "Seiten bearbeiten" (edit pages) gives an empty page, the selctor only has "New entry" and "------", so I cant edit or delete my static pages. I can see them only in the "Seitenreihenfolge" (order pages) tab.

And last: If I enter my given permalink in the browser, I get nothing but my blog page.

Where did I go wrong?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Static Pages Plugin doesn't show my added entries.

Post by garvinhicking »

Hi!

Is the staticpage you saved existing in the serendipity_staticpages table? The only reason that it gets not displayed is if the page does not exist there. Or if you (accidentaly) assigned a different author to the staticpage than yourself and thus might have no privileges to edit this page.
And last: If I enter my given permalink in the browser, I get nothing but my blog page.
You must set a staticpage to "publish" to be able to view it in the frontend?

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/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Re: Static Pages Plugin doesn't show my added entries.

Post by stm999999999 »

Or if you (accidentaly) assigned a different author to the staticpage than yourself and thus might have no privileges to edit this page.
@blog.brockha.us: try to login with an admin-account - is is still empty?

And yes, the best way to have alook at the problem is to look in phpmyadmin if there is any static page in the tables.
Ciao, Stephan
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Post by blog.brockha.us »

@Garvin: It is in the database (serendipity_staticpages), authorid = 1 (that's me), publishstatus = 0 (okay, this explains, why it is not visible online).

But this page is still not visible in the static pages editor ("Seiten bearbeiten") but it is visible in the ordering editor ("Seitenreihenfolge").

I did a new one with puplishig state = publish.. This is not visble, too, in the editor but in the ordering editor.

Looking at the datatable, the ony strange thing I found was, that both pages have the permalink saved, I gave them, but a filename = "none.html". What is it with the permalink? Does it has to be a permalink to an already existing page/article? I gave both a new permalink. I used the one recommended by the editor (/index.php?/pages/pagetitle.html), but chanded only the "pagetitle.html" to in example "about.html".

As I don't understand the concept behind the static pages (what is the stuff with the parent pages and so on), I'm unsure, what to enter there.
But the editor showing the static pages in the ordering editor but not in the normal static pages editor is realy strange..

@stm999999999: My account is the admin account..
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Which database type are you using? MYSQL 4.0?

The staticpace plugin uses the method "selectPages()" to show the list of pages:

Code: Select all

        $q = 'SELECT id, authorid, pagetitle, parent_id
                FROM '.$serendipity['dbPrefix'].'staticpages
               WHERE content != \'plugin\'
            ORDER BY parent_id, pageorder';
Then the resultset is checked using the method checkPageUser(). This checks if the userlevel of the target user is the same or less than your own userlevel. Maybe you can check what your 'userlevel' attribute is set to in the serendipity_authors table? FOr an admin it should be 255.
Looking at the datatable, the ony strange thing I found was, that both pages have the permalink saved, I gave them, but a filename = "none.html". What is it with the permalink? Does it has to be a permalink to an already existing page/article? I gave both a new permalink. I used the one recommended by the editor (/index.php?/pages/pagetitle.html), but chanded only the "pagetitle.html" to in example "about.html".
'filename' is only the name of the template file to use, I think. The permalink will be a NEW link that willb e used for the created staticpage.

Staticpages create virtual pages like with a CMS tool. You can have your own hierarchy there, so you can make a nested category representation with parent and child pages there.

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/
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Post by blog.brockha.us »

I'm using MySQL 5.0.22 according to my infophp.

My Userlevel is 255.

Okay. I understand now, how this concept should be working.

Is it possible, that the backend is working but my admin template(?) is hiding the static page entries? I see.. I have to look into this deeper..
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

No, for the backend the template should not affect things. If userlevel matches and the entry is there in the database, I'm quitee stumbled. Maybe you could check the two involved functions and see what they are stripping out?

Bestr 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/
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Post by blog.brockha.us »

Yes, I will have a deeper look into it.
In the end it will lead into a "user to stupid" bug, I'm sure. :lol:
(reading: user=me)
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Post by blog.brockha.us »

Okay, I have the problem now.

The editor's code don't do any error checking after loading the pages. I had an DB error about different coding tables while comparing stuff. Now I set all to utf8_unicode_ci and the editor is finding the pages again. Former it was latin1_swedish_ci, perhaps this was the default before installing s9y.

I have some more problems with the plugin now.

1) If the plugin is reinstalled, it adds the staticpages_types to the table again, leading in many rows in this table after I tried to install it a couple of times.

2) The pages are now listed in the sp editor, but I'm still unable to load the sp into the browser. If I enter the defined permalink for this page, the main blog page is shown only.

3) There are some warnings in the code of the plugin. I will send them via mail to stm999999999, as german is more easy here. ;-)
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Post by blog.brockha.us »

Point 2)
After installing the sitebar plugin, too, now my static page is shown.. Hmm? Why do I need to install this? Strange...
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Yes, re-installing the staticpage plugin multiple times can lead to that behaviour if you don't manually delete the staticpage tables. The current way of DB-building and upgrading doesn'T offer an easy way to check for existing things. I just committed stm's new version and altrered the DB-creation routine a little bit so that it tries to not re-insert the staticpage types.

About your permalinks: How did you configure the SP permalink, and what did you enter in your URL? How does it differ from the link that the staticpage sidebar plugin gives you?

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/
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Post by blog.brockha.us »

It doesn't differ at all!
And funny: Now I can put the side plugin to the "hidden" column of the side bar plugins, ans still everything works fine. It looks like the sidebar plugin has some sideeffect while first installing, that makes all this work at last. But this is just a guess/impression, didn't investigate it further.
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
Post Reply