Thanks, TR,
I figured to change the Access, I'll look further to the "permissions" forum search. The main issue, I couldn't find an "CORE - add item" in Edit Permissions at the admin created, Theme Gallery..... the choice for adding items were "CORE - Add sub-item". I'll take a look around.
EDIT: It looks like "add item" doesn't exists. Hence, works when a sub-album is created, thus, "add sub-item"
Thanks,
James
joshuap
Joined: 2008-09-14
Posts: 5
Posted: Mon, 2008-09-15 01:33
I can't seem to get Gallery 2.3 and Drupal working right together. Well, actually, I can but the user galleries don't work properly. I have Gallery2 set up to create the user galleries when the user is first accessed. However, when the user first hits the gallery2 URL, it displays a security violation, then goes to the main gallery. When the user clicks on 'Your Gallery' link, it gives the same security violation. However, the user is able to create sub galleries in the main gallery.
Basically, here are the steps:
1. New user created in Drupal
2. New user is activated and logs in to Drupal
3. New user hits gallery2 URL
4. New user gets security violation
5. New user sees the main gallery
6. New user goes to the 'Your Gallery' gallery
7. New use gets security violation.
How do I fix this?
Thanks,
-Josh
scaturan
Joined: 2004-09-12
Posts: 1153
Posted: Mon, 2008-09-15 14:28
my System Information remains the same (see 1st post on this thread) - My issue with ImageMagick as I mentioned on that post remains the same, and just got worse today....
well because, it looks like ImageMagick 6.4.3 breaks when installed on both of my 2.2.5 multisite setup and 2.3 SVN (checked out on 9/15/08 @ 4:25am) sandbox. I upgraded from 6.3.x to 6.4.3 http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/ImageMagick/
and now everytime I attempt to run Site Admin > Graphics Toolkits > "Test Settings" and/or install/reinstall the ImageMagick plugin (on either a standalone 2.2.5, a multisite 2.2.5, a 2.3 SVN and 2.3 SVN multisite) - an "identify" process stays resident that stalls and fills up my /tmp directory with imagemagick-* file worth ~4GB - I have no choice but to issue kill -9 PID-of-identify and rm /tmp/magick-* to recover, else, my whole box goes into coma for running out of swap space.
Any advice would be appreciated. I could attempt to downgrade ImageMagick to 6.3 if all fails.
The funny thing is after kill the resident "identify" process, Gallery 2 validates ImageMagick as installed and I can upload items just fine. Do I really need "identify" at this point? It's
been troublesome for me.
UPDATE:
I found the problem(s). Omitting the following lines resolves identify.core from being created in /g2data/tmp/ after a crash AND the stay-resident "identify" process no longer appears. AHHHH! what a relief!
the culprit in ~/modules/imagemagick/classes/ImageMagickToolkitHelper.class
I guess my ImageMagick was not configured to support those formats I omitted with /** and */ -but who cares, so long as it works. woo!
trbailey
Joined: 2007-04-16
Posts: 172
Posted: Mon, 2008-09-15 14:55
scaturan wrote:
I guess my ImageMagick was not configured to support those formats I omitted with /** and */ -but who cares, so long as it works. woo!
FREEBSD 7 FIX:
For those on a BSD system that can't or won't even attempt to fix the code read the previous comment and then this:
You'll need to install ImageMagick using pkg_add -f ImageMagick For some reason the ports version is messed up. I've had the same issue with the ports compiled version (runaway identify, i.e. it hangs in a loop). I didn't see a bug for it yet but I'm sure someone is aware. It will be corrected on the ports collection eventually.
I can't seem to get Gallery 2.3 and Drupal working right together. Well, actually, I can but the user galleries don't work properly. I have Gallery2 set up to create the user galleries when the user is first accessed. However, when the user first hits the gallery2 URL, it displays a security violation, then goes to the main gallery. When the user clicks on 'Your Gallery' link, it gives the same security violation. However, the user is able to create sub galleries in the main gallery.
Basically, here are the steps:
1. New user created in Drupal
2. New user is activated and logs in to Drupal
3. New user hits gallery2 URL
4. New user gets security violation
5. New user sees the main gallery
6. New user goes to the 'Your Gallery' gallery
7. New use gets security violation.
How do I fix this?
Thanks,
-Josh
Josh, what's the security violation say?
James
JonnyG
Joined: 2005-10-20
Posts: 23
Posted: Tue, 2008-09-16 00:20
I finally found time to try the upgrade again and made it through the upgrade fine. I took the nightly upgrade from yesterday.
Unfortunately, when I call the following line:
$g2moddata = GalleryEmbed::handleRequest();
My site displays a blank page. If I comment that line out, the page displays fine. I go into the $smarty->display('tiki.tpl'), but it never comes out.
Any ideas? If I comment that line out, the display is fine.
The gallery runs fine http://www.tatankanation.org/gallery225, just if I call that embedded handle request, than the main site doesn't come up, it dies in the $smarty->display.
One last item, this was working in 2.2.5.
Reiddust
Joined: 2006-05-27
Posts: 117
Posted: Wed, 2008-09-17 07:14
I can't help but read here that most of the problems are when Gallery is embedded within another program.
I have had no issues with the latest version at all, and it's been a lot of fun using it. I have embedded gallery in itself
but it seems to handle that without a problem. Not saying that these issues stated aren't important, but Gallery as a
stand alone/multi-site of itself is working fantastic
:D
jettyrat
Joined: 2005-12-30
Posts: 32
Posted: Wed, 2008-09-17 17:48
I have G2.3 installed and embedded in phpBB3 and it seems to be working perfectly. I've not tested all the features of Gallery itself, but the integration aspects seem to work just fine.
I do however have one minor issue to report for GalleryEmbed::getImageBlock() that I don't understand. I'm testing using the getImageblock on an embedded index page and for guest users it works fine on first page load and on subsequent page loads, but for registered users it works fine on first page load, then generates this php notice for subsequent page loads - PHP Notice: in file ..../gallery2/modules/core/classes/GalleryView.class on line 659: Undefined index: id It still seems to work ok even with the notice generated.
It's entirely possible I'm doing something wrong, but the code used is fairly straightforward.
<?php
class g2helper
{
var $_compatibleEmbedVersionMajor = 1;
var $_compatibleEmbedVersionMinor = 4;
var $_init_array;
/**
* Gallery2 helper constructor
* check and initialize some settings and load the main Gallery embed file
*/
function g2helper()
{
global $config, $user, $phpEx;
$user->add_lang('mods/g2i/gallery2');
if (empty($config['g2i_fullPath']) || empty($config['g2i_embedUri']) || empty($config['g2i_g2Uri']))
{
trigger_error($user->lang['OBTAIN_SETTINGS_FAILED'], E_USER_ERROR);
}
$this->_init_array = array(
'embedUri' => $config['g2i_embedUri'],
'g2Uri' => $config['g2i_g2Uri'],
'loginRedirect' => dirname($config['g2i_embedUri']) . "/ucp.$phpEx?mode=login",
'apiVersion' => array($this->_compatibleEmbedVersionMajor, $this->_compatibleEmbedVersionMinor)
);
require_once($config['g2i_fullPath']);
}
/**
* utility method to init Gallery user
*
* @param int $userId currrent user_id or false for guest user
*
* @access private
*/
function _galleryInit($userId)
{
$this->_init_array['activeUserId'] = (empty($userId)) ? 'guest' : $userId;
$ret = GalleryEmbed::init($this->_init_array);
if (isset($ret))
{
global $user;
trigger_error(sprintf($user->lang['G2_INITUSER_FAILED'], $this->_init_array['activeUserId']) . $user->lang['G2_ERROR'] . $ret->getAsHtml(), E_USER_ERROR);
}
}
/**
* complete the Gallery transaction
*/
function _done()
{
$ret = GalleryEmbed::done();
if (isset($ret))
{
global $user;
trigger_error($user->lang['G2_TRANSACTION_FAILED'] . $user->lang['G2_ERROR'] . $ret->getAsHtml(), E_USER_ERROR);
}
}
function fetchImageBlock()
{
global $user;
$userId = ($user->data['user_type'] == USER_IGNORE) ? false : $user->data['user_id'];
$this->_galleryInit($userId);
list ($ret, $g2_images) = GalleryEmbed::getImageBlock(array('blocks' => 'randomImage|randomImage', 'show' => 'none'));
if (isset($ret))
{
trigger_error('getImageBlock error' . $user->lang['G2_ERROR'] . $ret->getAsHtml(), E_USER_ERROR);
}
$this->_done();
return $g2_images;
}
}
?>
jettyrat
Joined: 2005-12-30
Posts: 32
Posted: Wed, 2008-09-17 19:52
Also, seems fairly easy to generate this raw error message when embedded (I've seen it many times while playing around with the integration code):
Fatal error: Call to a member function getId() on a non-object in C:\htdocs\gallery2\modules\core\classes\GalleryEmbed.class on line 247
An easy way is to login to embed app (phpBB3 in this case), visit the embedded Gallery, then wait until phpbb session expires (or delete browser session id cookie), then click anything that requires another g2 init and there it is.
valiant
Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2008-09-18 17:21
@swordfish:
glad you got it sorted.
the error said that ffmpeg expects / requires an output file for the "/usr/bin/ffmpeg -i inputfile.mov" command, and that's just plain silly. definitely sounds like a ffmpeg bug / regression. but you figured that out already.
@Reiddust:
regarding the error in internet explorer...
- do you use a plain old matrix theme or do you use another theme or theme modifications?
- please post a URL to one of the galleries / pages that shows the IE error.
- does it affect all modern IE versions (6, 7, 8) or just a specific one?
@scaturan:
sounds like a imagemagick bug (not a G2 bug).
please use g2's buffered debugging to get a list of all the IM commands that G2 is executing when testing the binaries and then try to isolate which exact call(s) triggers the IM coredump
once you've identified the command, try to reproduce the problem in the command line and if successful, please file a bug against imagemagick on their project website.
@dawirick:
the navigation block has been removed from gallery.
either your gallery theme or your gallery theme settings still try to include that block.
please check at site admin -> themes to see if any block list includes the navigation block. if so, remove it.
if it's not there, maybe your theme hardcodes the include in gallery2/themes/[your theme name]/templates/*.tpl and you need to remove it from the theme template.
The gallery runs fine http://www.tatankanation.org/gallery225, just if I call that embedded handle request, than the main site doesn't come up, it dies in the $smarty->display.
One last item, this was working in 2.2.5.
I tried the latest nightly build and still no luck on this. I'm going to have to go back to 2.2.5. Question, I've added pictures since upgrading. If I go back to 2.2.5, I'd think that I'd lose those pictures. Am I correct? Any way to not lose them?
Thanks,
Jon
valiant
Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2008-09-20 18:03
> If I go back to 2.2.5, I'd think that I'd lose those pictures. Am I correct? Any way to not lose them?
the only way to go back is to restore a previous database backup. and if you do that, you lose all database changes made in g2.3. so yes, you'd lose the new images.
be sure to restore a g2data backup as well. you don't want to have any discrepancies between the database and g2data.
@blank page:
enable "immediate" debug mode to find out more.
also, check your apache error log.
Shoot, figured as much. Error logs don't show anything wrong with the blank page.
The GoDaddy error logs show nothing, so no idea where the problem is. I don't want to delve into Smarty to see where it is actually dying.
I tried cloning the $smarty object before calling Gallery but it didn't help. Whatever Gallery is doing to it still was in the cloned object. If I comment out the call to gallery, the $smarty object works fine after the call.
Seems like I need to go back to 2.2.5 and hope that when 2.3 comes out this has been fixed, and I can upgrade then.
valiant
Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2008-09-20 20:06
@jonnyg:
there is no bug filed about this. there are no instructions on how to reproduce this issue with a fresh gallery 2 / with a g2.2.5 -> g2.3 upgrade.
in other words: there's nothing the gallery team can do for you without the above information.
I'm not sure what you mean by instructions for how to reproduce. As I mentioned above, when I call that function it returns fine. But afterwards locks up in the $smarty->display function, never returning. A blank page is displayed.
It was working fine in 2.2.5. If I comment out the line $g2moddata = GalleryEmbed::handleRequest();, then the $smarty->display function works fine. No errors are displayed, nothing in the GoDaddy logs, so I do not know what to try next. Here is all the code:
$ret = GalleryEmbed::init(array('g2Uri' => $g2_Config['g2Uri'],
'embedUri' => $g2_Config['embedUri'],
'fullInit' => 'false',
'apiVersion' => array(1,0),
'activeUserId' => $g2_user));
if ($ret)
{
/* Error! */
/* Did we get an error because the user doesn't exist in g2 yet? */
$ret2 = GalleryEmbed::isExternalIdMapped($user, 'GalleryUser');
if ($ret2 && $ret2->getErrorCode() & ERROR_MISSING_OBJECT)
{
/* The user does not exist in G2 yet. Create in now on-the-fly */
$ret = GalleryEmbed::createUser($user, array('username' => $user));
if ($ret)
{
/* An error during user creation. Not good, print an error or do whatever is appropriate
* in your emApp when an error occurs */
print "An error occurred during the on-the-fly user creation for user " . $user . "<br>" . $ret2 . "<br>";
print $ret->getAsHtml();
exit;
}
}
else
{
/* The error we got wasn't due to a missing user, it was a real error */
if ($ret2)
{
print "An error occurred while checking if a user already exists<br>";
print $ret2->getAsHtml();
}
print "An error occurred while trying to initialize G2<br>";
print $ret->getAsHtml();
exit;
}
}
// comment out the section below, and the $smarty->display('tiki.tpl') works
$g2moddata = GalleryEmbed::handleRequest();
// show error message if isDone is not defined
if (!isset($g2moddata['isDone']))
{
print 'isDone is not defined, something very bad must have happened.';
exit;
}
// die if it was a binary data (image) request
if ($g2moddata['isDone'])
{
$logslib->add_log('debug', 'is done');
exit; // uploads module does this too
}
$smarty->assign('g2_ret', $ret);
$smarty->assign('g2_body', $g2moddata['bodyHtml']);
smarty->assign('mid', 'tiki-g2.tpl');
$logslib->add_log('debug', 'before displaying tiki.tpl');
$smarty->display("tiki.tpl");
// never hit this if we call the ::handlerequest
$logslib->add_log('debug', 'after displaying tiki.tpl');
The 2nd log message is never displayed. If I comment out the indented section that calls ::handlerequest, everything works. This was working fine in 2.2.5, it was the 2.3 upgrade that started the problems.
valiant
Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2008-09-20 20:58
i don't see where and how you create the $smarty instance.
i'd create it anew after the gallery calling code to make sure that gallery's use of smarty isn't interfering with yours.
Okay, I recreated the $smarty after calling and still have the problem. So it's not stepping on the $smarty global itself that is the issue. Some other global, the environment?
I verified that I have plenty of free memory, shows using 13MB out of the 75MB allocated.
JonnyG
Joined: 2005-10-20
Posts: 23
Posted: Sun, 2008-09-21 17:04
I've got a little more data. When I get the blank page, I get the following in the php error log.
[21-Sep-2008 10:00:50] PHP Fatal error: Cannot redeclare smarty_modifier_escape() (previously declared in /home/content/g/r/e/greisz/html/tatanka2/gallery225/lib/smarty/plugins/modifier.escape.php:22) in /home/content/g/r/e/greisz/html/tatanka2/lib/smarty_tiki/modifier.escape.php on line 100
Does that provide any clues?
valiant
Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2008-09-21 18:05
@jonnyg:
yes, that makes sense given that you're dealing with 2 different applications, both using smarty, but using different smarty folders.
as for a fix, there are probably multiple options. e.g.
- forcing g2 and twiki to use the same smarty library (changing include paths either in twiki or g2)
- improving smarty to have a more robust model for smarty modifier includes
- a workaround hack
i suggest you create a new forum topic to discuss this issue in detail.
please report the exact php error stack trace to see how and why the escape modifier is included twice.
Okay, modified the smarty lib to not try to reload a plugin function that already exists and it started working. I'll start another thread for that one.
Found another strange thing with embedded, with the following URL:
If I have the g2_highlightId on it, it doesn't display. If I remove the highlight from the URL it displays fine. When I go directly to the non-embedded site:
It displays fine but removes the highlight. In the embedded version a blank page is displayed. Nothing in the logs. Unfortunately, this is the code that the breadcrumb uses, so it breaks the breadcrumb. I'm going to try to strip it before the handle request.
Posts: 49
Thanks, TR,
I figured to change the Access, I'll look further to the "permissions" forum search. The main issue, I couldn't find an "CORE - add item" in Edit Permissions at the admin created, Theme Gallery..... the choice for adding items were "CORE - Add sub-item". I'll take a look around.
EDIT: It looks like "add item" doesn't exists. Hence, works when a sub-album is created, thus, "add sub-item"
Thanks,
James
Posts: 5
I can't seem to get Gallery 2.3 and Drupal working right together. Well, actually, I can but the user galleries don't work properly. I have Gallery2 set up to create the user galleries when the user is first accessed. However, when the user first hits the gallery2 URL, it displays a security violation, then goes to the main gallery. When the user clicks on 'Your Gallery' link, it gives the same security violation. However, the user is able to create sub galleries in the main gallery.
Basically, here are the steps:
1. New user created in Drupal
2. New user is activated and logs in to Drupal
3. New user hits gallery2 URL
4. New user gets security violation
5. New user sees the main gallery
6. New user goes to the 'Your Gallery' gallery
7. New use gets security violation.
How do I fix this?
Thanks,
-Josh
Posts: 1153
my System Information remains the same (see 1st post on this thread) - My issue with ImageMagick as I mentioned on that post remains the same, and just got worse today....
well because, it looks like ImageMagick 6.4.3 breaks when installed on both of my 2.2.5 multisite setup and 2.3 SVN (checked out on 9/15/08 @ 4:25am) sandbox. I upgraded from 6.3.x to 6.4.3 http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/ImageMagick/
and now everytime I attempt to run Site Admin > Graphics Toolkits > "Test Settings" and/or install/reinstall the ImageMagick plugin (on either a standalone 2.2.5, a multisite 2.2.5, a 2.3 SVN and 2.3 SVN multisite) - an "identify" process stays resident that stalls and fills up my /tmp directory with imagemagick-* file worth ~4GB - I have no choice but to issue kill -9 PID-of-identify and rm /tmp/magick-* to recover, else, my whole box goes into coma for running out of swap space.
Any advice would be appreciated. I could attempt to downgrade ImageMagick to 6.3 if all fails.
The funny thing is after kill the resident "identify" process, Gallery 2 validates ImageMagick as installed and I can upload items just fine. Do I really need "identify" at this point? It's
been troublesome for me.
UPDATE:
I found the problem(s). Omitting the following lines resolves identify.core from being created in /g2data/tmp/ after a crash AND the stay-resident "identify" process no longer appears. AHHHH! what a relief!
the culprit in ~/modules/imagemagick/classes/ImageMagickToolkitHelper.class
I guess my ImageMagick was not configured to support those formats I omitted with /** and */ -but who cares, so long as it works. woo!
Posts: 172
FREEBSD 7 FIX:
For those on a BSD system that can't or won't even attempt to fix the code read the previous comment and then this:
You'll need to install ImageMagick using
pkg_add -f ImageMagick
For some reason the ports version is messed up. I've had the same issue with the ports compiled version (runaway identify, i.e. it hangs in a loop). I didn't see a bug for it yet but I'm sure someone is aware. It will be corrected on the ports collection eventually.Author:Blog|Site
Posts: 49
Josh, what's the security violation say?
James
Posts: 23
I finally found time to try the upgrade again and made it through the upgrade fine. I took the nightly upgrade from yesterday.
Unfortunately, when I call the following line:
$g2moddata = GalleryEmbed::handleRequest();
My site displays a blank page. If I comment that line out, the page displays fine. I go into the $smarty->display('tiki.tpl'), but it never comes out.
Any ideas? If I comment that line out, the display is fine.
phpinfo at http://www.tatankanation.org/gallery225/phpinfo.php
The gallery runs fine http://www.tatankanation.org/gallery225, just if I call that embedded handle request, than the main site doesn't come up, it dies in the $smarty->display.
One last item, this was working in 2.2.5.
Posts: 117
I can't help but read here that most of the problems are when Gallery is embedded within another program.
I have had no issues with the latest version at all, and it's been a lot of fun using it. I have embedded gallery in itself
but it seems to handle that without a problem. Not saying that these issues stated aren't important, but Gallery as a
stand alone/multi-site of itself is working fantastic
:D
Posts: 32
I have G2.3 installed and embedded in phpBB3 and it seems to be working perfectly. I've not tested all the features of Gallery itself, but the integration aspects seem to work just fine.
I do however have one minor issue to report for GalleryEmbed::getImageBlock() that I don't understand. I'm testing using the getImageblock on an embedded index page and for guest users it works fine on first page load and on subsequent page loads, but for registered users it works fine on first page load, then generates this php notice for subsequent page loads - PHP Notice: in file ..../gallery2/modules/core/classes/GalleryView.class on line 659: Undefined index: id It still seems to work ok even with the notice generated.
It's entirely possible I'm doing something wrong, but the code used is fairly straightforward.
calling code snippet:
helper function snippets:
Posts: 32
Also, seems fairly easy to generate this raw error message when embedded (I've seen it many times while playing around with the integration code):
Fatal error: Call to a member function getId() on a non-object in C:\htdocs\gallery2\modules\core\classes\GalleryEmbed.class on line 247
An easy way is to login to embed app (phpBB3 in this case), visit the embedded Gallery, then wait until phpbb session expires (or delete browser session id cookie), then click anything that requires another g2 init and there it is.
Posts: 32509
@swordfish:
glad you got it sorted.
the error said that ffmpeg expects / requires an output file for the "/usr/bin/ffmpeg -i inputfile.mov" command, and that's just plain silly. definitely sounds like a ffmpeg bug / regression. but you figured that out already.
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 32509
@Reiddust:
regarding the error in internet explorer...
- do you use a plain old matrix theme or do you use another theme or theme modifications?
- please post a URL to one of the galleries / pages that shows the IE error.
- does it affect all modern IE versions (6, 7, 8) or just a specific one?
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 32509
@scaturan:
sounds like a imagemagick bug (not a G2 bug).
please use g2's buffered debugging to get a list of all the IM commands that G2 is executing when testing the binaries and then try to isolate which exact call(s) triggers the IM coredump
once you've identified the command, try to reproduce the problem in the command line and if successful, please file a bug against imagemagick on their project website.
thanks!
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 32509
@dawirick:
the navigation block has been removed from gallery.
either your gallery theme or your gallery theme settings still try to include that block.
please check at site admin -> themes to see if any block list includes the navigation block. if so, remove it.
if it's not there, maybe your theme hardcodes the include in gallery2/themes/[your theme name]/templates/*.tpl and you need to remove it from the theme template.
what theme are you using?
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 32509
@jettyrat:
the fatal error from GalleryEmbed.class has already been fixed (svn version).
We'll soon release a RC2 of G2.3 which includes the fix.
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 23
I tried the latest nightly build and still no luck on this. I'm going to have to go back to 2.2.5. Question, I've added pictures since upgrading. If I go back to 2.2.5, I'd think that I'd lose those pictures. Am I correct? Any way to not lose them?
Thanks,
Jon
Posts: 32509
> If I go back to 2.2.5, I'd think that I'd lose those pictures. Am I correct? Any way to not lose them?
the only way to go back is to restore a previous database backup. and if you do that, you lose all database changes made in g2.3. so yes, you'd lose the new images.
be sure to restore a g2data backup as well. you don't want to have any discrepancies between the database and g2data.
@blank page:
enable "immediate" debug mode to find out more.
also, check your apache error log.
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 23
Shoot, figured as much. Error logs don't show anything wrong with the blank page.
The GoDaddy error logs show nothing, so no idea where the problem is. I don't want to delve into Smarty to see where it is actually dying.
I tried cloning the $smarty object before calling Gallery but it didn't help. Whatever Gallery is doing to it still was in the cloned object. If I comment out the call to gallery, the $smarty object works fine after the call.
Seems like I need to go back to 2.2.5 and hope that when 2.3 comes out this has been fixed, and I can upgrade then.
Posts: 32509
@jonnyg:
there is no bug filed about this. there are no instructions on how to reproduce this issue with a fresh gallery 2 / with a g2.2.5 -> g2.3 upgrade.
in other words: there's nothing the gallery team can do for you without the above information.
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 23
I'm not sure what you mean by instructions for how to reproduce. As I mentioned above, when I call that function it returns fine. But afterwards locks up in the $smarty->display function, never returning. A blank page is displayed.
It was working fine in 2.2.5. If I comment out the line $g2moddata = GalleryEmbed::handleRequest();, then the $smarty->display function works fine. No errors are displayed, nothing in the GoDaddy logs, so I do not know what to try next. Here is all the code:
The 2nd log message is never displayed. If I comment out the indented section that calls ::handlerequest, everything works. This was working fine in 2.2.5, it was the 2.3 upgrade that started the problems.
Posts: 32509
i don't see where and how you create the $smarty instance.
i'd create it anew after the gallery calling code to make sure that gallery's use of smarty isn't interfering with yours.
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 23
The smarty is already a global created by the tikiwiki setup code. I don't create it, just do a global on it and use it.
Posts: 23
Okay, I recreated the $smarty after calling and still have the problem. So it's not stepping on the $smarty global itself that is the issue. Some other global, the environment?
I verified that I have plenty of free memory, shows using 13MB out of the 75MB allocated.
Posts: 23
I've got a little more data. When I get the blank page, I get the following in the php error log.
[21-Sep-2008 10:00:50] PHP Fatal error: Cannot redeclare smarty_modifier_escape() (previously declared in /home/content/g/r/e/greisz/html/tatanka2/gallery225/lib/smarty/plugins/modifier.escape.php:22) in /home/content/g/r/e/greisz/html/tatanka2/lib/smarty_tiki/modifier.escape.php on line 100
Does that provide any clues?
Posts: 32509
@jonnyg:
yes, that makes sense given that you're dealing with 2 different applications, both using smarty, but using different smarty folders.
as for a fix, there are probably multiple options. e.g.
- forcing g2 and twiki to use the same smarty library (changing include paths either in twiki or g2)
- improving smarty to have a more robust model for smarty modifier includes
- a workaround hack
i suggest you create a new forum topic to discuss this issue in detail.
please report the exact php error stack trace to see how and why the escape modifier is included twice.
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 23
Okay, modified the smarty lib to not try to reload a plugin function that already exists and it started working. I'll start another thread for that one.
Found another strange thing with embedded, with the following URL:
http://www.tatankanation.org/tiki-g2.php?g2_itemId=29&g2_highlightId=2446
If I have the g2_highlightId on it, it doesn't display. If I remove the highlight from the URL it displays fine. When I go directly to the non-embedded site:
http://www.tatankanation.org/gallery225/main.php?g2_itemId=29&g2_highlightId=2446
It displays fine but removes the highlight. In the embedded version a blank page is displayed. Nothing in the logs. Unfortunately, this is the code that the breadcrumb uses, so it breaks the breadcrumb. I'm going to try to strip it before the handle request.