Apologies if this has been corrected in a more recent version.

When attempting to move an item, the album tree used to select destinations is missing in Matrix and other themes. Firebug output indicates that YUI is not being loaded so the Tree widget cannot be initiated.

See attached screenshot.

CommentFileSizeAuthor
#3 moveitem.png106.21 KBprofix898
move_item.png293.41 KBthumb
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

profix898’s picture

That YUI tree widget is not part of the G2.2.x releases, we have a dropdown there, not? But its in the svn version for G2.3 (I see). However both (the YUI and dropdown) are working fine for me using the latest 5.x-2.x-dev (or local D6 copy).

thumb’s picture

Hmm, I downgraded to the latest 5.x.2.x-dev (Nov. 2, 2007) with no luck, still don't see the album tree widget. I've also noticed that other new YUI features added to G2.3 svn, including delete item, don't work. The delete feature displays a delete confirmation YUI panel.

I'm including the yahoo-dom-event.js, animation-min.js, and treeview-min.js to get this working for now. I think Gallery 2.3 recently added a JS combination/compression feature.

profix898’s picture

FileSize
106.21 KB

I've also noticed that other new YUI features added to G2.3 svn ...

I'm really starting to dislike all these new YUI features. I mean they are really nice and usable if everything works correctly, but unlike Drupal the G2 javascript doesnt degrade nicely. Actually G2 is almost completely unusable when js is disabled in the browser or for some reason the js is not included correctly. I dont understand why the G2 devs insist on replacing existing forms with such widgets instead of adding js features on top of the forms where applicable. But this doesnt seem to be discussible. Did you ever browse to the 'Plugins' page without js? You cant even enable/disable a plugin without js and for most widgets you dont even get a warning that you must have js enabled, it simply doesnt work.

However, back to the issue ;)
Attached is a screenshot how it looks like on installation with G2.3/svn. I will try to dive deeper into this sometime next week, but apparently the album tree widget is visible for me (although it doesnt look nice because the Garland css interferes with the widget styles).

profix898’s picture

Status: Active » Fixed

Can you please get the latest -dev version and try again? I think the issue should be solved. The problem is your 'special' server folder layout. From your entry at g.d.o. you are using a multisite G2 installation with the individual sites located at /sites/*/gallery and the G2 codebase on the same level as the Drupal dir. The 'gallery_outside' check so far only took the embedded gallery path into account to determine if G2 is installed inside or outside the Drupal root folder. In your case the module decided 'inside' because the embedded path is actually inside your Drupal path. However all js/css paths are relative to the G2 codebase (which is outside the Drupal path) and were therefore not recognized correctly. The patch I just committed should solve this problem.

Make sure to visit the 'Install' tab so that the internal configuration is updated properly.

thumb’s picture

Upgraded to the beta6, removed my hardcoded js links, but the album tree doesn't display. All I see is the combined call, which isn't of much use for debugging.

profix898’s picture

Title: Missing album tree menu for item moves » Gallery2 YUI widgets broken
Status: Fixed » Active

Get the latest -dev version, the patch I outlined above is not in beta6.

All I see is the combined call

Are you talking about the "JS combination/compression feature" you mentioned above? If so, is there any way to switch of this feature for debugging? Setting back to 'active' because YUI widgets appear for me, but many of them are not working correctly. For example I get a form.elements['g2_form[destination]'] has no properties error in FF2 when selecting an album in the album tree widget.

I fear we will see several issues with YUI in the upcoming release ... especially in embedded environment ...

thumb’s picture

Hi profix898. I upgraded last weekend to 5.x-2.0 (finally) and here's an update on what I'm observing.

My development environment:
- Gallery 2 codebase: http://g2.mydomain.com
- Drupal 5.6 (multisite): http://drupal.mydomain.com
- Embedded G2 (multisite) at http://drupal.mydomain.com/sites/mysite/gallery2

The move item YUI Tree widget and delete options work perfectly in this setup. In my production environment, I initially had my G2 codebase hosted from an entirely separate domain. When moving the development copy to production, the YUI code is not included.

So, I tried the following:
- Gallery 2 codebase: http://g2.production.com (Symlinked this subdomain's root directory to the gallery codebase)
- Drupal 5.6 (multisite): http://drupal.production.com
- Embedded G2 (multisite) at http://drupal.production.com/sites/mysite/gallery2

That didn't work, so I tried this too:
- Gallery 2 codebase: http://drupal.production.com/gallery2/ (Symlinked directory to the gallery codebase)
- Drupal 5.6 (multisite): http://drupal.production.com
- Embedded G2 (multisite) at http://drupal.production.com/sites/mysite/gallery2

I reset the gallery.module installation for both attempts without success. I thought that perhaps anti-XSS code meant to prevent JavaScript cross site attacks might be the cause of the issue, but I'm guessing not after trying the subdomain and symlink in the Drupal root.

The only thing that I haven't tried is to just place the real G2 codebase directory, no symlinks, directly into my Drupal root. I've resisted this up until now because I want the flexibility to host multisite standalone G2's. I also have my code repository structured to keep Drupal and Gallery separate.

Any thoughts? I'll try to catch valiant or one of the other core devs to get their thoughts. I need to start reviewing G2's embed API.

profix898’s picture

@thumb: valiant recently pointed me to that commit in hope that it is related to this issue. I'm extremely busy these days and didnt have time to check it. But I think its worth a look/try.

thumb’s picture

Thanks! I'll give it a try when I have a chance and report back.

profix898’s picture

Version: 5.x-2.0-beta3 » 6.x-1.x-dev
Priority: Normal » Critical

Still doesnt work for me. As far as I can tell all the required js is included in the page. I compared the actual includes with the debug output of smarty. You can easily do this by enabling the new debug features in the D6 module, which will print out the Drupal variables and optionally the G2 debug buffer (and smarty debug window). However, I get errors when the browser (FF2 here) executes the scripts with the result that YUI widgets do not show.

I tried to remove jquery.js manually to verify that we are not experiencing a jQuery vs. YUI issue here. No luck. Next thing to test is that adding the includes to the html head section direclty (using drupal_set_html_head) makes no difference, although I dont see why js should depend on the actual include path.

profix898’s picture

More people start trying gallery module 6.x-1.x-dev, what means we heavily need to solve our JS and CSS issues with G2.3 and Drual 6.x as soon as possible. (bump) I will work on this the next days ... It not only the YUI widgets, but all JS and CSS.

profix898’s picture

Title: Gallery2 YUI widgets broken » Gallery2 JS and CSS broken
Component: User Interface / Theming » Code / API
Assigned: Unassigned » profix898
profix898’s picture

Assigned: profix898 » Unassigned
Status: Active » Fixed

I removed most of the JS/CSS handling code from the module. This means we no longer use drupal_add_js/css but we inject the G2 JS/CSS directly into head (drupal_set_html_head). I dont see any way to bypass the aggregator in Drupal 6.x and to avoid the appended query string (for caching purposes), that basically corrupts the urls of all G2 includes.

thumb’s picture

Has this update been made in the 5.x-2.x branch?

profix898’s picture

I just did. As we are using drupal_set_html_head() to include G2 js/css the workaround for urls containing & with @import directive (#157978) is also redundant (@import is always above other includes) now. However, people using Lightbox2 with Gallery2 will probably get some trouble with their scripts, because the js does no longer cascade with the Drupal js includes.
I will wait to tag a new release for 5.x-2.x and collect some feedback from people using the new code. Please report here. Thx.

thumb’s picture

Version: 6.x-1.x-dev » 5.x-2.x-dev

Yay! I was able to remove the hardcoded YUI links from my G2 theme and the G2 Move and Delete Confirmation widgets still work properly. My theme uses Lightbox and it appears to be working fine. I've incorporated Lightbox through my G2 theme, not Drupal.

I am very happy to have this to do item off my list. Thank you very much :)

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.