Problem with Dynamic Folder list (DHTML)

keyzersuze

Joined: 2007-11-28
Posts: 32
Posted: Tue, 2008-11-04 04:48

I have just upgrade to 2.3 and I seem to have lost my dynamic folder list (DHTML), I can still use the drop down list, but I would rather have the DHTML.

I am viewing it with firefox, from a debiam amd64 box. It used to work with 2.2 what can I do to debug

Thanks

Gallery URL = http://www.samad.com.au/gallery2/main.php
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.6-5 apache2handler
Webserver = Apache/2.2.9 (Debian) DAV/2 mod_jk/1.2.26 PHP/5.2.6-5 with Suhosin-Patch proxy_html/3.0.0 mod_ssl/2.2.9 OpenSSL/0.9.8g mod_perl/2.0.4 Perl/v5.10.0
Database = postgres7 8.3.4 3 8.3.4, lock.system=flock
Toolkits = Exif, Getid3, LinkItemToolkit, Thumbnail, ArchiveUpload, Gd, Dcraw, Ffmpeg, ImageMagick, jpegtran, NetPBM
Acceleration = full/900, partial/900
Operating system = Linux max 2.6.26-1-amd64 #1 SMP Thu Oct 9 14:16:53 UTC 2008 x86_64
Default theme = matrix
gettext = enabled
Locale = en_GB
Browser = Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.3) Gecko/2008092814 Iceweasel/3.0.3 (Debian-3.0.3-2)
Rows in GalleryAccessMap table = 348
Rows in GalleryAccessSubscriberMap table = 16849
Rows in GalleryUser table = 6
Rows in GalleryItem table = 16841
Rows in GalleryAlbumItem table = 786
Rows in GalleryCacheMap table = 0

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2008-11-04 23:22

Try uninstalling and reinstalling the Album Select plugin.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
keyzersuze

Joined: 2007-11-28
Posts: 32
Posted: Wed, 2008-11-05 20:04

I tried that it made no difference :(

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2008-11-05 20:51

So when you go to Site Admin > Plugins you see options to install/uninstall/activate/deactivate plugins?

2.3 changed how javascript was delivered, but if that change was effecting you, I'd think that the Site Admin > Plugins page would also be broken for you.

It appears to me like everything is being delivered to the browser normally. I'm able to look at the combined javascript that has /modules/albumselect/dtree.js included and nothing looks out of place to me.

Can you go to www.example.com/gallery2/upgrade (replace example.com with your site) and go to step 2 and let me know if there are any missing or modified files?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2008-11-06 00:29

Never seen this behavior before.
When you remove it from the "blocks to show on the sidebar" does it get removed?
try deleting template cache in /lib/support/ but viewing the source it seems like it should work.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Thu, 2008-11-06 00:35

I know, that's the odd thing. I don't see anything wrong. When inspecting the page with Firebug, I can see that the script makes it to the browser and everything looks correct (from comparing with the script from my site, though I didn't look that closely) I didn't see any errors that popped out at me.

When looking at the Error Console from the Web Dev Toolbar it has these two errors:

Quote:
Error: YAHOO.util.CustomEvent is not a constructor
Source File: http://www.samad.com.au/gallery2/main.php?g2_view=core.CombinedJavascript&g2_key=<KEY_REMOVED>
Line: 13

Quote:
Error: albumTree.add is not a function
Source File: http://www.samad.com.au/gallery2/main.php
Line: 113

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
keyzersuze

Joined: 2007-11-28
Posts: 32
Posted: Thu, 2008-11-06 02:37
nivekiam wrote:
So when you go to Site Admin > Plugins you see options to install/uninstall/activate/deactivate plugins?

2.3 changed how javascript was delivered, but if that change was effecting you, I'd think that the Site Admin > Plugins page would also be broken for you.

It appears to me like everything is being delivered to the browser normally. I'm able to look at the combined javascript that has /modules/albumselect/dtree.js included and nothing looks out of place to me.

Can you go to www.example.com/gallery2/upgrade (replace example.com with your site) and go to step 2 and let me know if there are any missing or modified files?

Yep when I went to the plugin page, I was able to delete the plubgin and then went to update and updated my list and re installed the plug. Set it up again and tested

from page 2
missing

lib/adodb/drivers/adodb-pdo_sqlite.inc.php
lib/adodb/license.txt
lib/adodb/readme.txt
lib/smarty/COPYING.lib
lib/smarty/README
modules/bulkupload/locale/de/LC_MESSAGES/modules_bulkupload.mo
modules/bulkupload/po/de.po

modified

 install/steps/StorageSetupStep.class
        install/templates/StorageSetupRequest.html
        lib/adodb/adodb-error.inc.php
        lib/adodb/adodb-iterator.inc.php
        lib/adodb/adodb-lib.inc.php
        lib/adodb/adodb-perf.inc.php
        lib/adodb/adodb-php4.inc.php
        lib/adodb/adodb-time.inc.php
        lib/adodb/adodb.inc.php
        lib/adodb/drivers/adodb-ado.inc.php
        lib/adodb/drivers/adodb-ado5.inc.php
        lib/adodb/drivers/adodb-ado_mssql.inc.php
        lib/adodb/drivers/adodb-db2.inc.php
        lib/adodb/drivers/adodb-mysql.inc.php
        lib/adodb/drivers/adodb-mysqli.inc.php
        lib/adodb/drivers/adodb-mysqlt.inc.php
        lib/adodb/drivers/adodb-oci8.inc.php
        lib/adodb/drivers/adodb-oci805.inc.php
        lib/adodb/drivers/adodb-oci8po.inc.php
        lib/adodb/drivers/adodb-oracle.inc.php
        lib/adodb/drivers/adodb-pdo.inc.php
        lib/adodb/drivers/adodb-postgres64.inc.php
        lib/adodb/drivers/adodb-postgres7.inc.php
        lib/adodb/perf/perf-db2.inc.php
        lib/adodb/perf/perf-mssql.inc.php
        lib/adodb/perf/perf-mysql.inc.php
        lib/adodb/perf/perf-oci8.inc.php
        lib/adodb/perf/perf-postgres.inc.php
        lib/adodb/tohtml.inc.php
        lib/smarty/Smarty_Compiler.class.php
        lib/smarty/internals/core.process_compiled_include.php
        lib/smarty/plugins/modifier.debug_print_var.php
        lib/smarty/plugins/modifier.regex_replace.php
        lib/smarty/plugins/outputfilter.trimwhitespace.php
        upgrade/steps/SystemChecksStep.class
        modules/imageblock/classes/ImageBlockHelper.class

old file

lib/adodb/drivers/adodb-sqlite.inc.php
        lib/adodb/drivers/adodb-sqlitepo.inc.php
        lib/adodb/drivers/adodb-mssql.inc.php
        lib/adodb/drivers/adodb-mssqlpo.inc.php
        lib/adodb/drivers/adodb-odbc.inc.php
        lib/adodb/drivers/adodb-postgres.inc.php
        modules/exif/Preloads.inc

This is a install done via debian and the debian package if that makes any difference. And I recently rebuilt the machine, to the previous version

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Thu, 2008-11-06 04:54

Don't know what some of those modified files do. I would just download a fresh G2 install from here: http://codex.gallery2.org/Gallery2:Download#Packages and overwrite your current install.

Looking at some of the toolkits you have installed, I'd guess you need the "Full" version. Seeing that you're using en_gb instead of en_us, I don't know for sure, but I'm pretty sure you need the "All Languages" version. So I'd download the "Full -- All Languages" version.

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
keyzersuze

Joined: 2007-11-28
Posts: 32
Posted: Fri, 2008-11-07 21:03
Quote:
Don't know what some of those modified files do. I would just download a fresh G2 install from here: http://codex.gallery2.org/Gallery2:Download#Packages and overwrite your current install.

Sounds like a logical step forward, only problem is I have a debian install. and not a tar ball, I will download a new tar ball and go through and diff everything and find out what the differences are and push the bugs back through debian. Sounds like something fun to do over the weekend (not)

EDIT:-

I have been moving some photo's around and it seems like the new folder list on move item (the tree) is working not sure if the 2 are related

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Fri, 2008-11-07 21:27
Quote:
I have been moving some photo's around and it seems like the new folder list on move item (the tree) is working not sure if the 2 are related

Glad to hear it's working. But do you mean is or is not working?

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
keyzersuze

Joined: 2007-11-28
Posts: 32
Posted: Sun, 2008-12-28 21:20
nivekiam wrote:
Quote:
I have been moving some photo's around and it seems like the new folder list on move item (the tree) is working not sure if the 2 are related

Glad to hear it's working. But do you mean is or is not working?

Sorry me jumping ahead of my self. On some pages it works and on some pages it doesn't. The main page it doesn't on the edit tags page it does, go figure.

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

After reading this again, I realized I had not answered.

The dynamic list on the right hand side of the main page is still not working, but when I edit a picture details or move a picture it works, very strange

 
keyzersuze

Joined: 2007-11-28
Posts: 32
Posted: Sun, 2008-12-28 21:42

New info.
I turned on the console window in firefox and found this error

albumtree.add not a function ?

I uninstalled (and deleted the plugin ) and then re installed it - same problem.

I thing I looked at in the main page I have lots of these
albumTree.add(1, 0, "Events", pf+'Events/');
albumTree.add(2, 1, "1967", pf+'Events/1967/');

but the prototype looks like

// Adds a new node to the node array
dTree.prototype.add = function(id, pid, name, url, title, target, icon, iconOpen, open) {
this.aNodes[this.aNodes.length] = new Node(id, pid, name, url, title, target, icon, iconOpen, open);
};

I am not a js programmer, but it looks like the number of args is off ?

This code seems to work, its just above the add in the main page

albumTree.config.cookiePath = '/gallery2/';
albumTree.config.cookieDomain = '';
albumTree.add(0, -1, " Gallery", 'main.php');

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2008-12-28 21:46

Can you create a test album where the guest user can edit a picture to see the working behavior versus the non working behavior.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
keyzersuze

Joined: 2007-11-28
Posts: 32
Posted: Mon, 2008-12-29 22:23
floridave wrote:
Can you create a test album where the guest user can edit a picture to see the working behavior versus the non working behavior.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

Hi floridave

I have setup an account (will private email you), I have created an folder /Test and /Test/one /Test/two. I have placed 2 photos in /Test/one.

login, goto to /Test/one and then from the drop down menu select edit tags, you will notice the dynamic tree is there and working !

One other thing I noticed is that delete doesn't work from the drop menu ?

Alex

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2008-12-30 04:13

Thanks for the PM
I can now see the issue.
It has to do with the combined Javascript files. We combine them in G2.3 for performance improvements.
If the dhtml tree is on the sidebar it does not work
If the dhtml tree is on the album page it works.

The unusual thing is, is that the combined JS file ( I would assume ) should be the same.

see:
http://www.samad.com.au/gallery2/main.php?g2_view=core.CombinedJavascript&g2_key=79d601928169f43d1e68de7f175f9120
versus:
http://www.samad.com.au/gallery2/main.php?g2_view=core.CombinedJavascript&g2_key=0808f238bcd7f697f489ea5a0d885913

Some of the Yahoo! stuff is missing.

Will investigate a bit further.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
keyzersuze

Joined: 2007-11-28
Posts: 32
Posted: Tue, 2008-12-30 20:05

Thanks

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2008-12-30 20:46

Can you do a file integrity check:
FAQ: How can I make sure that my installation files are all intact?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
keyzersuze

Joined: 2007-11-28
Posts: 32
Posted: Tue, 2008-12-30 22:38

Done.

I had some extra files - these where removed

lib/adodb/drivers/adodb-sqlite.inc.php
lib/adodb/drivers/adodb-sqlitepo.inc.php
lib/adodb/drivers/adodb-mssql.inc.php
lib/adodb/drivers/adodb-mssqlpo.inc.php
lib/adodb/drivers/adodb-odbc.inc.php
lib/adodb/drivers/adodb-postgres.inc.php
modules/exif/Preloads.inc

I have removed these (they are not part of the deb package either !)

these are the missing files

lib/adodb/drivers/adodb-pdo_sqlite.inc.php
lib/adodb/license.txt
lib/adodb/readme.txt
lib/smarty/COPYING.lib
lib/smarty/README
modules/bulkupload/locale/de/LC_MESSAGES/modules_bulkupload.mo
modules/bulkupload/po/de.po

Doesn't seem like anything important (not sure if they are intentional missing from the deb package)

This is the list of modified

install/steps/StorageSetupStep.class
install/templates/StorageSetupRequest.html
lib/adodb/adodb-error.inc.php
lib/adodb/adodb-iterator.inc.php
lib/adodb/adodb-lib.inc.php
lib/adodb/adodb-perf.inc.php
lib/adodb/adodb-php4.inc.php
lib/adodb/adodb-time.inc.php
lib/adodb/adodb.inc.php
lib/adodb/drivers/adodb-ado.inc.php
lib/adodb/drivers/adodb-ado5.inc.php
lib/adodb/drivers/adodb-ado_mssql.inc.php
lib/adodb/drivers/adodb-db2.inc.php
lib/adodb/drivers/adodb-mysql.inc.php
lib/adodb/drivers/adodb-mysqli.inc.php
lib/adodb/drivers/adodb-mysqlt.inc.php
lib/adodb/drivers/adodb-oci8.inc.php
lib/adodb/drivers/adodb-oci805.inc.php
lib/adodb/drivers/adodb-oci8po.inc.php
lib/adodb/drivers/adodb-oracle.inc.php
lib/adodb/drivers/adodb-pdo.inc.php
lib/adodb/drivers/adodb-postgres64.inc.php
lib/adodb/drivers/adodb-postgres7.inc.php
lib/adodb/perf/perf-db2.inc.php
lib/adodb/perf/perf-mssql.inc.php
lib/adodb/perf/perf-mysql.inc.php
lib/adodb/perf/perf-oci8.inc.php
lib/adodb/perf/perf-postgres.inc.php
lib/adodb/tohtml.inc.php
lib/smarty/plugins/modifier.debug_print_var.php
upgrade/steps/SystemChecksStep.class
modules/imageblock/classes/ImageBlockHelper.class

I have downloaded the latest zip and will check the files

EDIT: after only removing the extra files, the tree is back !

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2008-12-30 22:43

I will not be able to assist further with missing or modified files. I don't know about the debian package but suspect that some of those files are needed anyway.
perhaps the debian maintainer has a idea.
Can you install a second instance of G2 in a test directory with the files from our download page? Like I said I don't have a clue about debian.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
keyzersuze

Joined: 2007-11-28
Posts: 32
Posted: Thu, 2009-01-01 01:28

Hi

Thats cool, its on my list of things to do, see what the differences are.

But removing the extra files seems to have helped.

 
keyzersuze

Joined: 2007-11-28
Posts: 32
Posted: Thu, 2009-01-01 22:53

Hi

I have checked the files and added comments inline, most have to do with the upgrade to adodb 5.05 (debian package) from 4.98 (gallery2 download). I am no php expert, but it looks very cosmetic, and mainly with the way the library deals with stuff

Alex

* install/steps/StorageSetupStep.class
uses '/var/lib/gallery2/g2data' instead of $galleryStub->getConfig('data.gallery.base')

* install/templates/StorageSetupRequest.html
Same as above - one or 2 other minor (I believe differences), I will log a debian bug report for these

* lib/adodb/adodb-error.inc.php
V5.05 compared to V4.98

* lib/adodb/adodb-iterator.inc.php
V5.05 compared to V4.98

* lib/adodb/adodb-lib.inc.php
V5.05 compared to V4.98

* lib/adodb/adodb-perf.inc.php
V5.05 compared to V4.98

* lib/adodb/adodb-php4.inc.php
V5.05 compared to V4.98

* lib/adodb/adodb-time.inc.php
differences in whitespace

* lib/adodb/adodb.inc.php
V5.05 compared to V4.98

* lib/adodb/drivers/adodb-ado.inc.php
V5.05 compared to V4.98

* lib/adodb/drivers/adodb-ado5.inc.php
V5.05 compared to V4.98

* lib/adodb/drivers/adodb-ado_mssql.inc.php
V5.05 compared to V4.98

* lib/adodb/drivers/adodb-db2.inc.php
V5.05 compared to V4.98

* lib/adodb/drivers/adodb-mysql.inc.php
V5.05 compared to V4.98

* lib/adodb/drivers/adodb-mysqli.inc.php
V5.05 compared to V4.98

* lib/adodb/drivers/adodb-mysqlt.inc.php
V5.05 compared to V4.98

* lib/adodb/drivers/adodb-oci8.inc.php
V5.05 compared to V4.98

* lib/adodb/drivers/adodb-oci805.inc.php
V5.05 compared to V4.98

* lib/adodb/drivers/adodb-oci8po.inc.php
V5.05 compared to V4.98

* lib/adodb/drivers/adodb-oracle.inc.php
V5.05 compared to V4.98

* lib/adodb/drivers/adodb-pdo.inc.php
V5.05 compared to V4.94

* lib/adodb/drivers/adodb-postgres64.inc.php
V5.05 compared to V4.98

* lib/adodb/drivers/adodb-postgres7.inc.php
V5.05 compared to V4.98

* lib/adodb/perf/perf-db2.inc.php
V5.05 compared to V4.98

* lib/adodb/perf/perf-mssql.inc.php
V5.05 compared to V4.98

* lib/adodb/perf/perf-mysql.inc.php
V5.05 compared to V4.98

* lib/adodb/perf/perf-oci8.inc.php
V5.05 compared to V4.98

* lib/adodb/perf/perf-postgres.inc.php
V5.05 compared to V4.98

* lib/adodb/tohtml.inc.php

@@ -176,7 +176,7 @@
 	
 	for ($i=0; $i<sizeof($arr); $i++) {
 		$s .= '<TR>';
-		$a = $arr[$i];
+		$a = &$arr[$i];
 		if (is_array($a)) 
 			for ($j=0; $j<sizeof($a); $j++) {
 				$val = $a[$j];

* lib/smarty/plugins/modifier.debug_print_var.php
filter password in debug

* upgrade/steps/SystemChecksStep.class
change in '%s OR run chmod -R 777 %s.')

* modules/imageblock/classes/ImageBlockHelper.class
not sure why this is in the list, not part of the download