Page 1 of 1

Static Pages Bug

Posted: Sat Oct 29, 2005 2:32 am
by embj13
Hello, I just upgraded to the latest revision of the static pages mod yesterday. I noticed that none of my articles were showing up on the front page. So, I go to check the articles in the ACP. I saw the new feature that lets you set the the article as a draft or if it is published. My articles were set to draft, so I set them to publish.

Whenever I did that, I got a few errors about MySQL fields not being in the table.

Apparently, the plugin upgrader doesn't create the new fields in the table. I went and created the following fields as INT and the value set to 1:

publishstatus
shownavi
showonnavi

It works now...are those the correct values that I set? Also, is this bug just limited to me, or what? Thanks.

Posted: Sat Oct 29, 2005 3:00 am
by latcarf
Hey, I did the same thing and it avoided the error but I'm not sure if it works as the plugin author intended (since I don't know what the DB would look like for a newly installed staticpage plugin).

On a side note, in a newly created staticpage, the URL shorthand name shows up (I don't recall it doing that before).

Anyone have some insight into this?

This is the only bump I had in an otherwise successful and VERY easy upgrade from 8 to 9! Thanks Garvin and all of the Serendipity team!

Posted: Sun Oct 30, 2005 1:06 pm
by garvinhicking
Hm, well in fact the plugin code contains this:

Code: Select all

            case 8:
                $q = "ALTER TABLE {$serendipity['dbPrefix']}staticpages ADD COLUMN shownavi int(4) default '1';
                      ALTER TABLE {$serendipity['dbPrefix']}staticpages ADD COLUMN showonnavi int(4) default '1';
                      ALTER TABLE {$serendipity['dbPrefix']}staticpages ADD COLUMN publishstatus int(4) default '1';";
                serendipity_db_schema_import($q);
                $q = "UPDATE {$serendipity['dbPrefix']}staticpages
                         SET shownavi = 1,
                             showonnavi = 1,
                             publishstatus = 1";
                serendipity_db_query($q);
What DB are you guys using? MySQL?
On a side note, in a newly created staticpage, the URL shorthand name shows up (I don't recall it doing that before).
Where does it show up exactly?

Best regards,
Garvin

I have the same problem.

Posted: Sun Oct 30, 2005 4:51 pm
by Wizard
I noticed the same error. I had a post on another topic. I'll move it to here to consolidate the two threads.
Wizard wrote:I noticed that the plugin upgrade dosen't like the publish-staus field. Viewing another post in this forum it appears that the plugin doesn't create the correct table/field in the database or insert the correct values for the field. Not sure which. I don't have direct access to my database (shared hosting) so it would be hard for me to access the database and create the correct field/values. Is an upgrade in order?
It shows when you try to save the static page. At the top of the page after it repeats the verbage all on one line I might add, is:

Code: Select all

/ Unknown column 'publishstatus' in 'field list'
All I did was upgrade via Spartacus to the new version and started getting this error when I open an exsiting static page and try to save. In fact I tried creating a new static page with no content and this is the error I get when I save.

Code: Select all

Done: The new settings have been saved at 08:46:06
ERROR: 
INSERT INTO serendipity_staticpages (headline,permalink,pagetitle,articletype,publishstatus,content,markup,
articleformat,articleformattitle,authorid,parent_id,show_childpages,
pre_content,pass,filename,is_startpage,shownavi,showonnavi,
timestamp,pageorder) values ('Test', '/serendipity/index.php?/pages/test.html', 'pagetitle',
 '1', '0', '', '1', '1', 'Southern California Wizard :: ', '1', '0', '0', '', '', 'none.html', '0', '1', '1', '1130687166', '1')
/ Unknown column 'publishstatus' in 'field list'
As a result of this test, I have concluded that new static pages are not saving, nor if I edit existing. I am running s9y v 0.9

Hope this helps in the debug.

Posted: Sun Oct 30, 2005 10:23 pm
by latcarf
Hey Garvin,
What DB are you guys using? MySQL?
I'm using MySQL DB.
Where does it show up exactly?
The shorthand name is showing up where the Static Page navigation would be. Even if I explicitly set the fields "showonnavi" and "shownavi" to 0 in the database, the shorthand name still shows up:

Code: Select all

<table border="0" cellpadding="2" cellspacing="2" width="100%" class="staticpage_navigation">
        <tr>
            <td class="staticpage_navigation_left"   style="width: 20%"><a href="" title="prev"></a></td>
            <td class="staticpage_navigation_center" style="width: 60%; text-align: center"><a href="/FFXI/pages/lushangs.html" title="top">Lu Shang</a></td>
            <td class="staticpage_navigation_right"  style="width: 20%; text-align: right"><a href="" title="next"></a></td>
        </tr>
    </table>
"Lu Shang" is the shorthand name.

My serendipity_event_staticpage.php file is version 3.07 and the serendipity_plugin_staticpage.php file is 1.9

Posted: Sun Oct 30, 2005 11:57 pm
by garvinhicking
I've just committed version 3.08 of the plugin which should fix some issues.

Latcarf, the backhand name link seems to be required for linking, but I am not so much involved in the latest navigational changes, so let's wait for Falk to drop by on this issue :)

Regards,
Garvin

Posted: Mon Oct 31, 2005 12:33 am
by embj13
garvinhicking wrote:What DB are you guys using? MySQL?
Yes, I'm using it to. MySQL 4.1.15 to be exact, but I suppose that doesn't matter anymore.

Also, should v. 3.08 be showing up in Spartacus yet? If so, I'm not seeing it. It shows that I'm using v. 3.06. Shouldn't it already be at v. 3.07?

Posted: Mon Oct 31, 2005 1:02 pm
by garvinhicking
It takes up to 48 hours until the new version can be caught by your local installation, sadly.

If you clean your cache (enter spartacus plugin config, click on save) you can reduce it to 24hours, though :)

Regards,
Garvin