First off, great software. I love it. I've been looking for exactly this for some time. I've integrated it into my WordPress theme and am really excited about getting more photos up.
On to my issue...when I'm at a photo page and I plug in all my info, write my message and click submit, the page turns white...with nothing viewable.
However, if I go back to the thumbnail page and click on the photo again to look at the comments, the comment I just posted is there.
Also, when the page turns white and I hit refresh, the post will double (or triple or quadruple...depending on how many times I hit refresh).
I noticed the form action="#"... should that be something else? why is my page turning blank after posting a comment?
Thanks for any support.
Comments
pick a gallery, then pick the image. at the page where you can post a comment...try to post one. when you hit submit, the page goes white.
Has anyone figured out what causes this or how to fix it? I've integrated my zen photo album into the K2reloaded theme for wordpress.
http://vvroz.com/photos/
"OK
The document has moved here.
Apache/1.3.36 Server at vvroz.com Port 80"
The link points to the same url for my image page and it just reloads it and my image page displays again with the comment added.
Is there something wrong with mod rewrite on my host server or something wrong with my zenphoto setup?
Any ideas would be very helpful.
Thanks.
I was having this problem as well ...
You probably have something like this in your index.php...
`/* Start Wordpress */
define('WP_USE_THEMES', false);
require($_SERVER["DOCUMENT_ROOT"].'/blog/wp-blog-header.php');
/* Start zenphoto */
require_once("zen/template-functions.php");
$themepath = 'themes';`
Swap them around, i.e. start ZenPhoto first then WordPress.. This worked for me, I was having issues with the image page always displaying a comment error due to some conflict with the $error variable.
This was resolved by replacing all instances of $error in the zen source with $zenerror.
Works perfectly now.
`<?php<br />
/* Start zenphoto */
require_once("zen/template-functions.php");
$themepath = 'themes';
$theme = $_zp_gallery->getCurrentTheme();
$_zp_themeroot = WEBPATH . "/$themepath/$theme";
/* Start Wordpress */
define('WP_USE_THEMES', false);
require('../wp-blog-header.php');
//Get Wordpress Header */
get_header();
echo "
echo "
if (in_context(ZP_IMAGE)) {
include("$themepath/$theme/image.php");
} else if (in_context(ZP_ALBUM)) {
include("$themepath/$theme/album.php");
} else if (in_context(ZP_INDEX)) {
include("$themepath/$theme/index.php");
}
echo "
//Get Wordpress Footer
get_footer();
?>`
But then I get this MySQL error: "MySQL Query ( SELECT *, (date + 0) AS date FROM zenalbums WHERE `folder`='test-album' LIMIT 1; ) Failed. Error: Table 'vvrozcom_wrdp1.zenalbums' doesn't exist"
If I move image.php, album.php up before starting wordpress, the album works correctly and so do the comments like you said, however then my ZenPhoto album isn't embbedded in the wordpress theme its above it.
`<?php<br />
/* Start zenphoto */
require_once("zen/template-functions.php");
$themepath = 'themes';
$theme = $_zp_gallery->getCurrentTheme();
$_zp_themeroot = WEBPATH . "/$themepath/$theme";
echo "
echo "
if (in_context(ZP_IMAGE)) {
include("$themepath/$theme/image.php");
} else if (in_context(ZP_ALBUM)) {
include("$themepath/$theme/album.php");
} else if (in_context(ZP_INDEX)) {
include("$themepath/$theme/index.php");
}
echo "
/* Start Wordpress */
define('WP_USE_THEMES', false);
require('../wp-blog-header.php');
//Get Wordpress Header */
get_header();
//Get Wordpress Footer
get_footer();
?>`
What am I doing wrong? Thanks for any help.
Someone want to submit a bug? Thanks.
if (!defined('ZENFOLDER')) { define('ZENFOLDER', 'zp-core'); }
if (!file_exists(dirname(__FILE__) . '/' . ZENFOLDER . "/zp-config.php")) {
$location = "http://". $_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME']) . "/" . ZENFOLDER . "/setup.php";
header("Location: $location" );
}
require_once(ZENFOLDER . "/template-functions.php");
Take these lines and move them to the very top of the page. Then define your Wordpress theme and header:
define('WP_USE_THEMES', false);
require($_SERVER["DOCUMENT_ROOT"].'/wp-blog-header.php');
Then put the rest of your Zenphoto code below that.
I'm not saying this will fix everyone's issue, but it fixed mine. I hope it helps at least another couple of frustrated people.