Editing entry in ecto changes dates
-
electroteque
- Regular
- Posts: 58
- Joined: Tue Jan 17, 2006 2:13 am
Editing entry in ecto changes dates
Hi there, using ecto and editing entries is still fucking up the dates, even upon changing the date in the edit window, once i click publish the current date is still being used,
this is being sent as
<member>
<name>dateCreated</name>
<value><dateTime.iso8601>20060326T09:06:03Z</dateTime.iso8601></value>
</member>
this is in the response code
<member><name>dateCreated</name>
<value><dateTime.iso8601>20060327T00:12:03</dateTime.iso8601></value>
</member>
Can someone please fix this reoccuring bug ?
Alos this happens when it tries to set the post category
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>mt.setPostCategories</methodName>
<params>
<param>
<value><string>53</string></value>
</param>
<param>
<value><string>admin</string></value>
</param>
<param>
<value><string>******</string></value>
</param>
<param>
<value><array><data>
<value><struct>
<member>
<name>categoryId</name>
<value><string>1</string></value>
</member>
<member>
<name>isPrimary</name>
<value><boolean>1</boolean></value>
</member>
</struct></value>
<value><struct>
<member>
<name>categoryId</name>
<value><string>5</string></value>
</member>
<member>
<name>isPrimary</name>
<value><boolean>0</boolean></value>
</member>
</struct></value>
</data></array></value>
</param>
</params>
</methodCall>
Response:
<br />
<b>Warning</b>: mysql_real_escape_string() expects parameter 1 to be string, array given in <b>/Volumes/FIREWIRE/www/dev/weblog/include/db/mysql.inc.php</b> on line <b>203</b><br />
<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /Volumes/FIREWIRE/www/dev/weblog/include/db/mysql.inc.php:203) in <b>/Volumes/FIREWIRE/www/dev/weblog/plugins/serendipity_event_xmlrpc/PEAR/XML/RPC/Server.php</b> on line <b>398</b><br />
<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /Volumes/FIREWIRE/www/dev/weblog/include/db/mysql.inc.php:203) in <b>/Volumes/FIREWIRE/www/dev/weblog/plugins/serendipity_event_xmlrpc/PEAR/XML/RPC/Server.php</b> on line <b>398</b><br />
this is being sent as
<member>
<name>dateCreated</name>
<value><dateTime.iso8601>20060326T09:06:03Z</dateTime.iso8601></value>
</member>
this is in the response code
<member><name>dateCreated</name>
<value><dateTime.iso8601>20060327T00:12:03</dateTime.iso8601></value>
</member>
Can someone please fix this reoccuring bug ?
Alos this happens when it tries to set the post category
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>mt.setPostCategories</methodName>
<params>
<param>
<value><string>53</string></value>
</param>
<param>
<value><string>admin</string></value>
</param>
<param>
<value><string>******</string></value>
</param>
<param>
<value><array><data>
<value><struct>
<member>
<name>categoryId</name>
<value><string>1</string></value>
</member>
<member>
<name>isPrimary</name>
<value><boolean>1</boolean></value>
</member>
</struct></value>
<value><struct>
<member>
<name>categoryId</name>
<value><string>5</string></value>
</member>
<member>
<name>isPrimary</name>
<value><boolean>0</boolean></value>
</member>
</struct></value>
</data></array></value>
</param>
</params>
</methodCall>
Response:
<br />
<b>Warning</b>: mysql_real_escape_string() expects parameter 1 to be string, array given in <b>/Volumes/FIREWIRE/www/dev/weblog/include/db/mysql.inc.php</b> on line <b>203</b><br />
<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /Volumes/FIREWIRE/www/dev/weblog/include/db/mysql.inc.php:203) in <b>/Volumes/FIREWIRE/www/dev/weblog/plugins/serendipity_event_xmlrpc/PEAR/XML/RPC/Server.php</b> on line <b>398</b><br />
<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /Volumes/FIREWIRE/www/dev/weblog/include/db/mysql.inc.php:203) in <b>/Volumes/FIREWIRE/www/dev/weblog/plugins/serendipity_event_xmlrpc/PEAR/XML/RPC/Server.php</b> on line <b>398</b><br />
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Editing entry in ecto changes dates
Hi!
Would you be able to tell me the full request and response markup? Because I actually don't know where this could happen; we use the central XML_RPC_iso8601_encode() method to deal with timestamps. And actually I can see no code where serendipity touches the timestamp after entry creation...?
About the issue of category setting, thanks for your request snippet. I'll try to debug that and report back. I'm currently having a flu, so I'll check with that later this week.
Best regards,
Garvin
Would you be able to tell me the full request and response markup? Because I actually don't know where this could happen; we use the central XML_RPC_iso8601_encode() method to deal with timestamps. And actually I can see no code where serendipity touches the timestamp after entry creation...?
About the issue of category setting, thanks for your request snippet. I'll try to debug that and report back. I'm currently having a flu, so I'll check with that later this week.
Best 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/
-
electroteque
- Regular
- Posts: 58
- Joined: Tue Jan 17, 2006 2:13 am
-
electroteque
- Regular
- Posts: 58
- Joined: Tue Jan 17, 2006 2:13 am
Fatal error: Smarty error: [in file:/www/dev/weblog/templates/default/entries.tpl line 20]: [plugin] (secure mode) modifier 'escape' is not allowed (core.load_plugins.php, line 118) in /Volumes/FIREWIRE/www/classes/PEAR/Smarty/libs/Smarty.class.php on line 1095
Garvin it looks like I am trapped using the bundled libs, i install what was required and all my libs are up to date. Is there no other way to use my default pear library ?
Garvin it looks like I am trapped using the bundled libs, i install what was required and all my libs are up to date. Is there no other way to use my default pear library ?
-
electroteque
- Regular
- Posts: 58
- Joined: Tue Jan 17, 2006 2:13 am
Fatal error: Smarty error: [in file:/www/dev/weblog/templates/default/entries.tpl line 20]: [plugin] (secure mode) modifier 'escape' is not allowed (core.load_plugins.php, line 118) in /Volumes/FIREWIRE/www/classes/PEAR/Smarty/libs/Smarty.class.php on line 1095
Garvin it looks like I am trapped using the bundled libs, i install what was required and all my libs are up to date. Is there no other way to use my default pear library ?
Garvin it looks like I am trapped using the bundled libs, i install what was required and all my libs are up to date. Is there no other way to use my default pear library ?
-
electroteque
- Regular
- Posts: 58
- Joined: Tue Jan 17, 2006 2:13 am
-
electroteque
- Regular
- Posts: 58
- Joined: Tue Jan 17, 2006 2:13 am
I fixed the timestamp in the backend, ecto is now sending the right timestamp
["timestamp"]=>
string(10) "1143367612"
I echoes the update string it returns timestamp='1143367612'
Timestamp still gets updated to 1143414240
Here is the return array
["timestamp"]=>
string(10) "1143415733"
To prevent this warning
<b>Warning</b>: mysql_real_escape_string() expects parameter 1 to be string, array given in <b>/Volumes/FIREWIRE/www/dev/weblog/include/db/mysql.inc.php</b> on line <b>203</b><br />
function serendipity_db_escape_string($string) {
global $serendipity;
if (!is_array($string)) {
if (is_resource($serendipity['dbConn']) && function_exists('mysql_real_escape_string')) {
return mysql_real_escape_string($string, $serendipity['dbConn']);
} else {
return mysql_escape_string($string);
}
}
}
["timestamp"]=>
string(10) "1143367612"
I echoes the update string it returns timestamp='1143367612'
Timestamp still gets updated to 1143414240
Here is the return array
["timestamp"]=>
string(10) "1143415733"
To prevent this warning
<b>Warning</b>: mysql_real_escape_string() expects parameter 1 to be string, array given in <b>/Volumes/FIREWIRE/www/dev/weblog/include/db/mysql.inc.php</b> on line <b>203</b><br />
function serendipity_db_escape_string($string) {
global $serendipity;
if (!is_array($string)) {
if (is_resource($serendipity['dbConn']) && function_exists('mysql_real_escape_string')) {
return mysql_real_escape_string($string, $serendipity['dbConn']);
} else {
return mysql_escape_string($string);
}
}
}
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Thanks, I'll look into this once I get better.
The modifier problem smarty tells you can happen if you did not extract all plugins of the smarty directory and the escape plugin cannot be found in the smarty dir
Regards,
Garvin
The modifier problem smarty tells you can happen if you did not extract all plugins of the smarty directory and the escape plugin cannot be found in the smarty dir
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/
-
electroteque
- Regular
- Posts: 58
- Joined: Tue Jan 17, 2006 2:13 am
Hi I moved over the bundled smarty library to my pear directory and still the same or similar problem
Fatal error: Smarty error: [in file:/www/dev/weblog/templates/default/entries.tpl line 20]: [plugin] (secure mode) modifier 'escape' is not allowed (core.load_plugins.php, line 118) in /Volumes/FIREWIRE/www/classes/PEAR/Smarty/libs/Smarty.class.php on line 1088
Fatal error: Smarty error: [in file:/www/dev/weblog/templates/default/entries.tpl line 20]: [plugin] (secure mode) modifier 'escape' is not allowed (core.load_plugins.php, line 118) in /Volumes/FIREWIRE/www/classes/PEAR/Smarty/libs/Smarty.class.php on line 1088
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Maybe include/functions_smarty.inc.php, serendipity_smarty_init() looks for smarty still in bundled directory not in PEAR, because Smarty is not PEAR. Maybe it sets paths different than to PEAR and thus does not find it.
Just a few ideas. As I mentioned, I'm not able to investigate this unless I get a bit better here
Just a few ideas. As I mentioned, I'm not able to investigate this unless I get a bit better here
# 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/
-
electroteque
- Regular
- Posts: 58
- Joined: Tue Jan 17, 2006 2:13 am
-
electroteque
- Regular
- Posts: 58
- Joined: Tue Jan 17, 2006 2:13 am
Thats incorrect
@define('SMARTY_DIR', S9Y_PEAR_PATH . 'Smarty/libs/');
require_once SMARTY_DIR . 'Smarty.class.php';
die(SMARTY_DIR . 'Smarty.class.php');
Smarty/libs/Smarty.class.php
Im loading the bundled smarty library from my default include path as when u turn the use pear config on it doesnt set the S9Y_PEAR_PATH constant, thats what it seems to do here, something else it happening here.
@define('SMARTY_DIR', S9Y_PEAR_PATH . 'Smarty/libs/');
require_once SMARTY_DIR . 'Smarty.class.php';
die(SMARTY_DIR . 'Smarty.class.php');
Smarty/libs/Smarty.class.php
Im loading the bundled smarty library from my default include path as when u turn the use pear config on it doesnt set the S9Y_PEAR_PATH constant, thats what it seems to do here, something else it happening here.
-
electroteque
- Regular
- Posts: 58
- Joined: Tue Jan 17, 2006 2:13 am
-
electroteque
- Regular
- Posts: 58
- Joined: Tue Jan 17, 2006 2:13 am
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Check if Smarty/libs/plugins/modifier.escape.php exists, is fully readable and has no PHP parse errors
# 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/