Page 1 of 1
Static Pages Plugin doesn't show my added entries.
Posted: Fri Jul 06, 2007 8:02 pm
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?
Re: Static Pages Plugin doesn't show my added entries.
Posted: Sun Jul 08, 2007 7:57 pm
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
Re: Static Pages Plugin doesn't show my added entries.
Posted: Sun Jul 08, 2007 9:58 pm
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.
Posted: Sun Jul 08, 2007 10:10 pm
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..
Posted: Sun Jul 08, 2007 10:17 pm
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
Posted: Sun Jul 08, 2007 11:17 pm
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..
Posted: Sun Jul 08, 2007 11:27 pm
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
Posted: Mon Jul 09, 2007 12:02 am
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.
(reading: user=me)
Posted: Mon Jul 09, 2007 11:28 pm
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.

Posted: Tue Jul 10, 2007 12:07 am
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...
Posted: Tue Jul 10, 2007 11:03 am
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
Posted: Tue Jul 10, 2007 3:17 pm
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.