Image chooser does not display subalbums in wordpress

pacman37

Joined: 2007-11-23
Posts: 8
Posted: Fri, 2007-11-23 17:54

Hi,
I just upgraded to Gallery 2.2.3 to get the latest version of WPG2 working. When I select the image chooser, none of the subalbum hierarchy is shown. My gallery album has only subalbums, no images. If I insert a test image into the gallery, it shows up in G2 Image just fine, but there are still no subalbums. Any ideas on how to fix this?

AttachmentSize
debug.jpg17.03 KB
 
capt_kirk

Joined: 2006-01-24
Posts: 492
Posted: Fri, 2007-11-23 18:25

Did you delete the old g2image files per the WPG2 readme? WPG2 now includes all of the g2image files as a subfolder of the wpg2 folder.

Do you have any permissions set on the subalbums? The new version of G2Image pays attention to G2 permissions, so the current G2 user has to have permission to see the subalbums for them to show up in G2Image.

Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website

 
pacman37

Joined: 2007-11-23
Posts: 8
Posted: Sat, 2007-11-24 01:03

Thanks for your help.

I've completely removed the WPG2 folder and then reinstalled it. None of the files/directories the readme says to delete exist on my system.

I don't have wordpress users besides admin, and I don't show any G2 users except admin and guest. Both admin and guest have access to all subalbums.

 
capt_kirk

Joined: 2006-01-24
Posts: 492
Posted: Sat, 2007-11-24 12:08

Have you tried it from a different computer? Do you have javascript enabled in your browser? The album tree requires javascript (as do all of the insertion functions). It's getting the information from Gallery2, as you can see from the current album title in the WPG2 album insert frame. So, it looks like the album tree is not getting its javascript to fire.

Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website

 
pacman37

Joined: 2007-11-23
Posts: 8
Posted: Sat, 2007-11-24 21:49

Javascript enabled in Firefox. Doesn't work in IE either. Doesn't work on other computers. :-(

I think your theory is correct, I can seem my albums being added to the tree in the source (dump attached).

 
capt_kirk

Joined: 2006-01-24
Posts: 492
Posted: Sun, 2007-11-25 02:43

Yes, the dtree.js call to load the script is there and the tree info is there, it's just not firing the javascript. I'm wondering about the ​​​​​ at the top...

Could you try the latest WPG2 SVN snapshot? It's (fairly) stable and includes a lot of changes to g2image, including a new header.

Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website

 
pacman37

Joined: 2007-11-23
Posts: 8
Posted: Sun, 2007-11-25 03:34

Deactived, deleted, copied the new one, activated it, same results.

 
pacman37

Joined: 2007-11-23
Posts: 8
Posted: Sun, 2007-11-25 03:35

Deactived, deleted, copied the new one, activated it, same results.

Thanks again for your continued help.

 
dloftis

Joined: 2003-02-03
Posts: 16
Posted: Sun, 2007-11-25 05:03

Hi - Just thought I'd jump on this. I'm having the exact same problem.

Wordpress 2.3.1
Gallery 2.2.3
WPG2 3.0.1 (tried 3.0.2 initially, rolled back to 3.0.1 to see if that fixed it)

One added note... in IE, I get a "problem with this web page might prevent it from being displayed properly..."

Line: 52
Char: 38
Error: Unterminated string constant
Code: 0
URL: http://{myurl}/wp-content/plugins/wpg2/g2image/g2image.php?g2ic_tinymce=1

Any assistance is much appreciated!

 
capt_kirk

Joined: 2006-01-24
Posts: 492
Posted: Sun, 2007-11-25 05:08

Sorry that I missed this the first time. There is a "newline" character ( \n )in one of your titles. Look at the album tree code in the page source, where it says

Quote:
d.add(1,0,"Deutschland 2006
","?current_album=19&sortby=orig_time_desc&images_per_page=15");

it should all be on one line.

I'll see about stripping out newlines in the backend script so that this won't be a problem in the future, but removing the newline will fix it for now.

(I hope that fixes your problem too, dloftis)

Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website

 
pacman37

Joined: 2007-11-23
Posts: 8
Posted: Sun, 2007-11-25 05:20

Woohoo! Working now. :-) Thanks again for all your help.

I should have caught this too . . . I'd found an earlier thread with a similar problem before I posted this question, and I noticed the newline when I was looking at the jscript but didn't make the connection.

Btw, I think the fix will be a big help to the non-savvy - when I went back and changed the title, it was not at all obvious that there was a "\n" there - the newline doesn't shown anywhere on any of the page rendering or G2 form fields. I'm not even sure how it got there in the first place.

 
dloftis

Joined: 2003-02-03
Posts: 16
Posted: Sun, 2007-11-25 05:28

perfect - that did the trick

thanks for the incredibly quick reply!