Static pages not working in 0.8.3?
Static pages not working in 0.8.3?
Before installing at an ISP I played with 0.8.2 and didn't have any problems with static pages.
Installed at ISP 0.8.3 and static pages are not working.
Don't have access to logs (have to ask ISP for it) so can't check tonight if there are any errors.
Anyone else experience any problems with static pages since switchign to 0.8.3?
When I save a static page all I get is a note saying that the settings have been saved, but no page is created.
Installed at ISP 0.8.3 and static pages are not working.
Don't have access to logs (have to ask ISP for it) so can't check tonight if there are any errors.
Anyone else experience any problems with static pages since switchign to 0.8.3?
When I save a static page all I get is a note saying that the settings have been saved, but no page is created.
Static pages work fine on 0.8.3 here.
By 'no page is created', do you get a completely blank page, or do you
get a page with everything BUT the static page content? In case of former,
it's likely to be a permissions problem that might have occurred when you
upgraded it. Make sure templates_c folder has the permissions set in such
a way that the webserve user can write to it, but preferably, no one else.
By 'no page is created', do you get a completely blank page, or do you
get a page with everything BUT the static page content? In case of former,
it's likely to be a permissions problem that might have occurred when you
upgraded it. Make sure templates_c folder has the permissions set in such
a way that the webserve user can write to it, but preferably, no one else.
I make s9y plugins, too.
My s9y blog depends on them.
My s9y blog depends on them.
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Another error might be that your serendipity_staticpages database table is not the right one to use with the version of your plugin.
Can you look which colums your serendipity_staticpages table has (via phpMyAdmin or sth. like that) and then tell us which version of the staticpage plugin you're using? It show show up on the plugin installation screen.
Regards,
Garvin
Can you look which colums your serendipity_staticpages table has (via phpMyAdmin or sth. like that) and then tell us which version of the staticpage plugin you're using? It show show up on the plugin installation screen.
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/
# 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/
I should have added some additional info.garvinhicking wrote:Another error might be that your serendipity_staticpages database table is not the right one to use with the version of your plugin.
I did not upgrade.. I played with 0.8.2 in one machine and did a fresh install in another.
Just in case.. Plugin version 1.22garvinhicking wrote:Can you look which colums your serendipity_staticpages table has (via phpMyAdmin or sth. like that) and then tell us which version of the staticpage plugin you're using?
Table details
Code: Select all
Column | Type
--------------------+------------------------
id | integer
parent_id | integer
articleformattitle | character varying(255)
articleformat | smallint
markup | smallint
pagetitle | character varying(255)
permalink | character varying(255)
is_startpage | smallint
show_childpages | smallint
content | text
pre_content | text
headline | character varying(255)
filename | character varying(255)
pass | character varying(255)
timestamp | integer
authorid | integer
Indexes:
"serendipity_staticpages_pkey"
primary key, btree (id)
Checked rights and template_c directory rights seems fine. See pages created by the web server.wesley wrote:By 'no page is created', do you get a completely blank page, or do you get a page with everything BUT the static page content?
As I mentioned in previous post I should have mentioned.. this is a fresh install of 0.8.3
What I am doing and what is happening:
* Admin
* Static page
* Select New
* Hit Go
* Put some info
* Hit save
I get on green at the top
Done: The new settings have been saved at 08:34:38
Back at the blog I only see "Front Page" on the list of static pages.
Selecting Front Page just takes me back to the front page.
Requested access to web logs from ISP.. waiting at the moment..
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
I bet you're using postgreSQL, right? There might be once again some errors because of inserting "" instead of "0" or so.
I have enabled verbose error reporting in the latest plugin version, please also check your postgreSql error log if you can find it somewhere.
Regards,
Garvin
I have enabled verbose error reporting in the latest plugin version, please also check your postgreSql error log if you can find it somewhere.
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/
# 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/
Since I have much better control home installed 0.8.3 home.. numerous errorsgarvinhicking wrote:I bet you're using postgreSQL, right? There might be once again some errors because of inserting "" instead of "0" or so.
Code: Select all
Cannot use a scalar value as an array in /usr/home/www/backuptalk.com/include/functions.inc.php on line 126
[11-Aug-2005 21:27:47] PHP Warning: Invalid argument supplied for foreach() in /usr/home/www/backuptalk.com/include/functions.inc.php on line 124
[11-Aug-2005 21:27:50] PHP Warning: Invalid argument supplied for foreach() in /usr/home/www/backuptalk.com/include/functions.inc.php on line 124
[11-Aug-2005 21:29:23] PHP Warning: pg_query(): Query failed: ERROR: currval of sequence "serendipity_staticpages_id_seq" is not yet defined in this session in /usr/home/www/backuptalk.com/include/db/postgres.inc.php on line 83
[11-Aug-2005 21:29:23] PHP Warning: pg_num_rows(): supplied argument is not a valid PostgreSQL result resource in /usr/home/www/backuptalk.com/include/db/postgres.inc.php on line 84
[11-Aug-2005 21:29:23] PHP Warning: pg_last_oid(): supplied argument is not a valid PostgreSQL result resource in /usr/home/www/backuptalk.com/include/db/postgres.inc.php on line 88
[11-Aug-2005 21:29:23] PHP Warning: Invalid argument supplied for foreach() in /usr/home/www/backuptalk.com/include/functions.inc.php on line 124
Looked at my database log.
The problem is with
The 'X' => '' and those are the problems as far as I can tell.
Tried to take a look at serendipity_event_staticpage.php, but didn't see where the variables are initialized. That file sure could use a few comments..
I did like though...
// Code copied from include/admin/plugins.inc.php. Sue me.
The problem is with
Code: Select all
INSERT INTO serendipity_staticpages
(headline,permalink,pagetitle,content,markup,articleformat,articleformattitle,
authorid,parent_id,show_childpages,pre_content,pass,filename,is_startpage)
values
('test', '/index.php?/pages/test.html', 'test', 'test
test', '1', '1', 'Test Backup site :: ', '1', '0', 'X', '', '', 'plugin_staticpage.tpl','X' );
Tried to take a look at serendipity_event_staticpage.php, but didn't see where the variables are initialized. That file sure could use a few comments..
I did like though...
// Code copied from include/admin/plugins.inc.php. Sue me.
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
I'm sorry for getting back later to you. I marked your message on my todo-list though.
I havejust committed a new version of the plugin. It was a bit tricky where those "" values came from:
The last two if-things were needed to set empty values to an "0" string to catch up properly on pgsql!
Hope it works,
Regards,
Garvin
I havejust committed a new version of the plugin. It was a bit tricky where those "" values came from:
Code: Select all
$q = "SELECT *
FROM {$serendipity['dbPrefix']}staticpages
WHERE id = " . (int)$id . "
LIMIT 1";
$page = serendipity_db_query($q, true, 'assoc');
if (is_array($page)) {
$this->staticpage =& $page;
if (empty($this->staticpage['filename'])) {
$this->staticpage['filename'] = 'none.html';
}
if (empty($this->staticpage['timestamp'])) {
$this->staticpage['timestamp'] = time();
}
if (empty($this->staticpage['show_childpages'])) {
$this->staticpage['show_childpages'] = '0';
}
if (empty($this->staticpage['is_startpage'])) {
$this->staticpage['is_startpage'] = '0';
}
}
Hope it works,
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/
# 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/
Doesn't seem like it worked.
To make sure I did it right.
File serendipity_event_staticpage/serendipity_event_staticpage.php
The code change was to be in the function fetchStaticPage and looks like
And the error report from PostgreSQL
To make sure I did it right.
File serendipity_event_staticpage/serendipity_event_staticpage.php
The code change was to be in the function fetchStaticPage and looks like
Code: Select all
function &fetchStaticPage($id) {
global $serendipity;
$q = "SELECT *
FROM {$serendipity['dbPrefix']}staticpages
WHERE id = " . (int)$id . "
LIMIT 1";
$page = serendipity_db_query($q, true, 'assoc');
if (is_array($page)) {
$this->staticpage =& $page;
if (empty($this->staticpage['filename'])) {
$this->staticpage['filename'] = 'none.html';
}
if (empty($this->staticpage['timestamp'])) {
$this->staticpage['timestamp'] = time();
}
#Changes for PostgreSQL
if (empty($this->staticpage['show_childpages'])) {
$this->staticpage['show_childpages'] = '0';
}
if (empty($this->staticpage['is_startpage'])) {
$this->staticpage['is_startpage'] = '0';
}
}
}
And the error report from PostgreSQL
Code: Select all
INSERT INTO serendipity_staticpages
(headline,permalink,pagetitle,content,markup,articleformat,articleformattitle,authorid,parent_id,show_childpages,pre_content,pass,filename,is_startpage)
values ('test', '/index.php?/pages/pagetitle.html', 'pagetitle', 'test', '1', '1', 'Test Backup site :: ', '1', '0', '', '', '', 'p lugin_staticpage.tpl', '')
Additional errors in static page?
While trying to troubleshoot the PostgreSQL issue for static page I had the PostgreSQL log and the php log open.
Upon entering the static page menu php reported
Upon entering the static page menu php reported
Code: Select all
Invalid argument supplied for foreach() in /usr/home/www/backuptalk.com/include/functions.inc.php on line 124
Patch not getting executed
While trying to troubleshoot the patch I put
exit(print_r ("<br>$page<br>\n"));
Inside the if of
function &fetchStaticPage($id)
It doesn't seem like it was executed.
I then change the code to
Exit displays a 1 instead of an array.
Basically it seems the function expects a record to exists in the database, but there is none.
Was the install of the plugin supposed to create a default page?
If not then why is the code looking for a page?
[Edit]
Inserted a record manually. Trying to edit after that, crashes too..
A patch simmilar to the one done for insert needs to be done for the update code.
Also even after the record I inserted manually new inserts still fail in PostgreSQL with the same error... a couple of numeric fields still submited as ''
exit(print_r ("<br>$page<br>\n"));
Inside the if of
function &fetchStaticPage($id)
It doesn't seem like it was executed.
I then change the code to
Code: Select all
function &fetchStaticPage($id) {
global $serendipity;
$q = "SELECT *
FROM {$serendipity['dbPrefix']}staticpages
WHERE id = " . (int)$id . "
LIMIT 1";
$page = serendipity_db_query($q, true, 'assoc');
exit(print_r ("<br>$page<br>\n")); <============ Note
Basically it seems the function expects a record to exists in the database, but there is none.
Was the install of the plugin supposed to create a default page?
If not then why is the code looking for a page?
[Edit]
Inserted a record manually. Trying to edit after that, crashes too..
A patch simmilar to the one done for insert needs to be done for the update code.
Also even after the record I inserted manually new inserts still fail in PostgreSQL with the same error... a couple of numeric fields still submited as ''
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Patch not getting executed
Francisco, thank so much for getting into this problem. I really appreciate this! I have just committed version 2.11 of the plugin which adds a new $this->checkPage() function call. That function always checks important set parameters and sets them to int values, if unset.
Can you check if that works?
Regards,
Garvin
Can you check if that works?
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/
# 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/