Closed (fixed)
Project:
Views Galleriffic
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Feb 2010 at 18:05 UTC
Updated:
27 Apr 2011 at 23:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
acouch commentedThanks for using this module and for sharing your experience.
Can you please be more specific about the problem? Is this a view that is attached to a node or is the page you are describing a view itself? Does the flag module appear and just not work or does it not appear at all? What about the flag module doesn't operate normally?
Comment #2
dgastudio commentedof course:
flag installed: printed in custom node.tpl using
print flag_create_link('bookmarks', $node->nid);. Using JavaScript toggle.Gallerific installed: printed un custom node.tpl using
print $node->content['media_gallery_node_content_2']['#value'];On open node.tpl, everything is ok, the gallery is working.
after press FLAG link the Gallerific Views is broken, it doesn't change after press on any thumb. But the flag link is still working, i can flag unflag content.
Comment #3
vatavale commented+1. I have the exactly same problem.
Comment #4
acouch commentedI've confirmed that these two don't play well together.
Thank you for posting this. I've added this issue to the module page.
I don't intend on fixing this but will happily commit a working patch.
Comment #5
mrgoltra commentedSame here. Once flag has been set all I can do is refresh the page so images would load.
forgot to mention that you will need to set the link type to Normal Link in flag module settings.
Comment #6
gmclelland commentedI might be completely wrong and stupid saying this, but could it be when the Flag's ajax request gets fired off all the Drupal's behaviors get reattached causing the problem since galleriffic is being initialized twice?
I had a similar problem with another jquery script that I added to my theme. The script was "Easy List Splitter" from http://www.madeincima.eu/blog/jquery-plugin-easy-list-splitter/
Every time an ajax event was fired or the DOM was modified all my columns would get messed up. You could also see this behavior when using other modules that modified the dom after the page is loaded. Examples: Skinr module - Applying a different skin to a block using a modal dialog, Boxes Module - ajax editing of blocks
So what I did was added this to my theme's(cmftao) js file
Before I was doing
So maybe in views_galleriffic.js:
Something like this:
Could be turned into something like this:
What do you think?
Comment #7
gmclelland commentedBy changing this in views_galleriffic.js:
var gallery = $('#thumbs').galleriffic({to this:
var gallery = $('#thumbs:not(.galleriffic-processed)').addClass('galleriffic-processed').galleriffic({It seems to work. I need more testers. The other problem I think it helps with is when there is other AJAX on the page.
For example a view that is ajax enabled on the same page as galleriffic.
Could someone else try this out? I'm a bit rushed at the moment. I will test some more later.
Hope that helps
Comment #8
gmclelland commentedDid some more changes in views_galleriffic.js I added context from:
this:
Drupal.behaviors.ViewsGalleriffic = function () {To this:
Drupal.behaviors.ViewsGalleriffic = function (context) {Then I changed this:
var gallery = $('#thumbs').galleriffic({To this:
var gallery = $('#thumbs:not(.galleriffic-processed)', context).addClass('galleriffic-processed').galleriffic({I can confirm that using the flag module 6.x-2.0-beta5 works now with javascript flags.
I am seeing some strange behavior with ajax views on the same page as a galleriffic gallery. When using an ajax pager on the view it allows you to click once and update the view, but the next click causes a full page refresh. So for example, when I click on the "2" it works just fine. When I click back on the "1" it causes a full page refresh. Strange, not sure what is causing this, but I do get this error in firebug.
See the attached image.
imageData is undefinedThe good news is that views_galleriffic continues to function properly even after the page is updated with AJAX or a flag was clicked. Before galleriffic would simply stop functioning after a flag was clicked or a view was updated with ajax.
Hope that helps
Comment #9
dirtysteak commentedI am also seeing ajax enabled views on the same page loading the entire page instead of just the view.
Comment #10
gmclelland commentedOk after some more trial and error and research, the AJAX problem can be fixed by making the following edits to jquery.galleriffic.js:
http://code.google.com/p/galleriffic/issues/detail?id=81 - make all the changes specified here
So the Flag issue and AJAX issue is now solved, just need a patch for the module.
Just to be clear, here is how to fix both the Javascript Flag and AJAX issues for the views_galleriffic module:
1. Update views_galleriffic.js - http://drupal.org/node/703760#comment-4011536
2. Update jquery.galleriffic.js - http://code.google.com/p/galleriffic/issues/detail?id=81
@acouch - How do you want to proceed? Do you need a patch or can you make these changes?
FYI... These fixes are for the Drupal 6 version of this module. Haven't tested with the D7 version.
Hope that helps everyone.
Comment #11
acouch commentedCan you make a patch?
http://drupal.org/patch/create
Comment #12
gmclelland commentedTook me a while to learn patching. So here is my first patch.
To those who want to test, I had to apply the patch using:
patch -p0 < path/file.patchfrom within the views_galleriffic module's directory
I made the changes against the latest dev release(Feb 25-2011).
Hope this helps everyone,
-Glenn
Comment #13
acouch commentedI committed this to 6.x and 7.x. Thanks for the work everyone. Will create a new release soon.