The simpler media website CMS
Warning: Cannot modify header information - headers already sent by (output started at /home/www/zenphoto/zenphoto/zp-core/kses.php:429) in /home/www/zenphoto/zenphoto/zp-core/functions-controller.php on line 164
Warning: Cannot modify header information - headers already sent by (output started at /home/www/zenphoto/zenphoto/zp-core/kses.php:429) in /home/www/zenphoto/zenphoto/zp-core/functions-controller.php on line 169
`
The error is resulted by my demo site (ZP Version 1.1.3) as well as Zp Demo Gallery.
Comments
I fixed this bug by adding "$inarray = getOption('allowed_tags');" in kses.php line 428.
I don't get any warning anymore, but I don't think you really can consider this as a fix, it's just a workaround.
Does anybody have an idea about how to solve the *real* bug?
...
`
$conf['allowed_tags'] = array (
'a' => array ('href' => array (), 'title' => array ()),
'abbr' => array ('title' => array ()),
'acronym' => array ('title' => array ()),
'b' => array (),
'blockquote' => array ('cite' => array ()),
'code' => array (),
'em' => array (),
'i' => array (),
'strike' => array (),
'strong' => array (),
'ul' => array (),
'ol' => array (),
'li' => array (),
);
`
...
The workaround by Schnouki gets the warning message out. The bug is still there...
There is a change in how the html tags allowed for comments as processed by kses are handled. There is now an option for these rather than code in zp-config.php.
first: the "fix" by Schnouki is not correct and should not be necessary. `getOption('allowed_tags')` does not return an array. It returns the option string. That must be parsed by the call on `parseAllowedTags` which is on the following line.
If you have not run setup.php, the kses allowed_tags option default will not have been set. This should be corrected, but does not seem to cause the errors you are describing.
The only way I have been able to generate the error described above is by manually editing the database option table row for `allowed_tags` and setting it to something invalid.
So, if you have run setup.php on the nightly build and are still having this problem you will need to delete the `allowed_tags` option row and re-run setup.php. If this still does not work, add a line below the call on `parseAllowedTags` in functions-controller as follows:
`if ($allowed === false) { $allowed = array(); } // someone has screwed with the allowed_tags option row in the database, but better safe than sorry`
With the current release AND the nightly build on IIS 5.
If I attempt to add a comment it will add 26 duplicates of the same comment and then redirect to a blank page.
Yes I have run setup.php and I've checked the allowed_tags.
I'd been tracking this problem and had come to the same Kses.php when I came across this post.
Do you get any cgi errors? Kses.php's task is to screen the information posted for html tags. It does not appear to be involved in the redirect.
It is strange that you get 26 duplicates. One would think that if the redirect is causing a repost, nothing would terminate the loop.
How about a link to your site so we can take a look.
I'll turn comments back on so you can look.
http://elgarl.acemulator.com
For some reason, the POST information is not cleared by the redirect. You can try adding `unset($_POST);` just before the header statement. It is only a guess, though.
unset($_POST);
did nothing when placed right before
header('Location: ' . $redirectTo);
Warning: Invalid argument supplied for foreach() in /var/www_data/zenphoto/zp-core/kses.php on line 429
Warning: Cannot modify header information - headers already sent by (output started at /var/www_data/zenphoto/zp-core/kses.php:429) in /var/www_data/zenphoto/zp-core/functions-controller.php on line 164
Warning: Cannot modify header information - headers already sent by (output started at /var/www_data/zenphoto/zp-core/kses.php:429) in /var/www_data/zenphoto/zp-core/functions-controller.php on line 169
But the comment is added.
Please see my posting above regarding the allowed_tags array.
I even gave ZP root access to make sure.
try nighty build (http://www.zenphoto.org/files/nightly/zenphoto-2007-12-21-trunk.zip) and run setup.php again
it's work!
I just re-downloaded it all again to be sure, and it's the same.
1. Header redirect isn't clearing the post data which causes multiple comments to be posted.
2. Tags and descriptions are not displayed or saved when added.
1. Header redirect isn't clearing the post data which causes multiple comments to be posted.
2. Tags and descriptions are not displayed or saved when added.
3. Tags and descriptions are saved when added, but kses.php still throws an error (what is the case for Schnouki (see above) and for me)
Which is it, are Tags and descriptions saved (#2) or not(#3)?
Have you upgraded to the nightly build? If so, have you run setup? If not, have you checked your zp-config file as described above?
Yes I have upgraded to the nightly build.
Yes I have checked the config file. I've deleted it and used the new one that comes with the nightly build.
Perhaps if you and ianboo could compare information about your installations, we might get somewhere. There must be some similarity between you that would flag what is causing these problems. At present I have no ideas.
***After adding:
"$inarray = getOption('allowed_tags');"
...to line 428 as per Schnouki, comments are now working.
You should really read this thread thouroughly. (Wonder why you didn't) What you did is NOT a fix.
Please review my message Posted: 2007-12-20 14:24:19 # 88.112.152.116