Hi,
I followed instructions up to the point of creating a filter block for the view views_isotope.
By default all the results show using the grid ie the ALL filter works great. The problem comes when I click on a filter, nothing is displayed.
When I click on All again, the results are displayed correct with the nice animation working well.
Here's my code for the view..
<div class="view view-work view-id-work view-display-id-page view-dom-id-8174145f559a3cd07a4583534c02880d">
<div class="view-header">
<div class="view view-work-filter view-id-work_filter view-display-id-block view-dom-id-b92d5397fa24bdbbfda3427192e73c36">
<div class="view-content">
<div class="isotope-options">
<ul class="isotope-filters option-set clearfix" data-option-key="filter">
<li><a href="#filter" data-option-value="*" class="selected">All</a></li>
<li><a class="filterbutton" data-option-value=".div--------spandesign-span---div" href="#filter"><div> <span>Design</span> </div></a></li>
<li><a class="filterbutton" data-option-value=".div--------spanmotion-span---div" href="#filter"><div> <span>Motion</span> </div></a></li>
<li><a class="filterbutton" data-option-value=".div--------spanweb-span---div" href="#filter"><div> <span>Web</span> </div></a></li>
</ul>
</div>
</div>
</div> </div>
<div class="view-content">
<div id="isotope-container" style="position: relative; overflow: hidden; height: 1360px;" class="isotope">
<div class="isotope-element design design design isotope-item" data-category="design design design" style="position: absolute; left: 0px; top: 0px; -webkit-transform: translate3d(0px, 0px, 0px) scale3d(1, 1, 1); opacity: 1;">
<div class="views-field views-field-title"> <span class="field-content"><a href="/crafted/content/saluto-valde-vicis">Saluto Valde Vicis</a></span> </div>
<div class="isotope-filter">Design, Design, Design</div> </div>
<div class="isotope-element design motion design isotope-item" data-category="design motion design" style="position: absolute; left: 0px; top: 0px; -webkit-transform: translate3d(170px, 0px, 0px) scale3d(1, 1, 1); opacity: 1;">
<div class="views-field views-field-title"> <span class="field-content"><a href="/crafted/content/eu-nunc-turpis-vero">Eu Nunc Turpis Vero</a></span> </div>
<div class="isotope-filter">Design, Design, Design</div> </div>
</div> </div>
</div>
Comments
Comment #1
guerno commentedSame issue here, with the example view, or a custom. Checked different themes, and all do not work. Drupal 7.21 is used, JQuery Update module is on 1.7
Comment #2
cfunken commentedSame issue here as well.
My code (edited for relevance) looks like this:
Seems to be a problem with the jQuery selectors from what I could discover so far.
My recent candidate for finding the faulty part is that the "div-classviews-field-views-field-name" class references in the selector is nowhere to be found in the code itself. But that lead has brought me no further to solving this problem than any other.
I did some doctoring in the views_isotope.js as well and encountered a peculiar little bit of behavior.
After line 31, I overwrote 'value' with a selector that seemed more appropriate to me
This should have, in theory, displayed all item containers belonging to the "Integrated" taxonomy. Instead it had the same behavior as before. All Items disappeared whenever a filter was used.
But instead of displaying all results when I clicked the "All" filter, it now showed the correct results for the "Integrated" filter.
So it seems that the jQuery selector at least "would" be correct, but something breaks it in the code... and that something doesn't happen if the initial filter is "*"...
That is about all of the digging I could manage so far. Thought I'd share it here on the off chance that someone else with the same problem will find it useful in solving the case.
(And in case I can find out how to fix this I'll update this in turn of course)
Comment #3
pyxio commentedI have the same problem. All show or nothing.
Comment #4
cfunken commentedI finally got it to work for me. But the solution I came up with is more of a hotfix and doesn't fully address where the issue itself comes from. (I think)
So... first of, the issue itself:
I've tracked the cause down to the "template_preprocess_views_isotope_filter_block" function in "views_isotope.theme.inc"
For some reason, the $row variable it goes through (line 104 and 105) contains html tags. These throw off the filters (specifically the data-option-value attributes of the a tags)
I have not been able to find out why they contain this and whether or not they should in the first place. My guess however is that we all have some minor but critical error in our view settings that causes this to happen.
Sadly, my knowledge of Drupal coding and module development is rather limited, so I got no further than that.
Luckily... there is something really simple you can do to fix this. Or at least patch over this and sidestep the issue.
Line 105 of "views_isotope.theme.inc" currently reads:
I've changed this to:
And it works like a charm.
Still though. I do not like this solution because it ignores and overrides the root issue. But at least it's a workable solution for the time being.
If someone has any additional suggestions for fixing it or making it more stable (or if someone notices some other issue that would come up because of this change) please let me know
Comment #5
pyxio commentedGreetings,
Here are several things to check to because they will mess up your isotope view if not properly configured...
1. Do not use semantic views fields or any other view field formats provided by 3rd party modules. The isotope module needs the taxonomy term style defined in the styles section of the field view settings.
2. Ensure you have the relevant taxonomy term field in your isotope grid view. That means ensuring you have the right TAXONOMY REFERENCE FIELD (this module uses field_tags by default, you need to CHANGE it if you want terms from a different vocabulary) Also, ensure this field is the LAST one in your view.
3. Ensure that in the field style you choose DIV and add the class isotope-filter to the above field.
4. Do not use the views rewrite results feature. Doing so wipes out views default styles which are needed.
5. Add a view filter Content: Has taxonomy term (not empty) to prevent offset errors.
6. On the term filters view, ensure ' Link this field to its taxonomy term page' is NOT CHECKED. This is checked by default. Your filters will not work if this box is ticked.
This should fix most problems. While it should work, the unfortunate thing is that theming is considerably more difficult since the view cannot be easily themed with rewrite results tricks. So you will need to add views template file to your theme and customize it from there.
Comment #6
kristofferromi've got a similar issue at http://nordicwaves.net/. The filters are working but not loading all articles tagged with term. Can you see what's the issue?
Comment #7
pyxio commentedkristofferrom
it's impossible to tell by looking at the web page. one would need admin access to look at the complete configuration all the way up from the vocabulary structure through to the views output.
Comment #8
kristofferromhey, found out that my grid only showed one tag at the time (grid view -> configure "tags" field). It's working now after allowing all tags
Comment #9
kristofferromhey, found out that my grid only showed one tag at the time (grid view -> configure "tags" field). It's working now after allowing all tags
Comment #10
maerys commented#4 helped me.
Comment #10.0
maerys commentedcompressed the text a little bit.
Comment #11
deadtech@gmail.com commentedHaving the same issue. The "All" shows all items in the isotope grid, but when I create a custom vocabulary, called "Isotope Sort Options" all filters display 0 results. Only "All" displays items (all of them).
I tried the example feature using Articles test content and test vocabulary items in a taxonomy called "Tags" and it the example filters fine.
I double checked all of my views settings against the Feature example and I swear it matches.
I tried #4 above with no success.
I diligently looked at the items in #5 to make sure I was settings all my view parameters correctly.
Any suggestions?
My isotope_home_filter_block view
My isotope_home view
Comment #12
riccardino commentedI ran into the same problem when upgrading from 7.x.1.0-beta2 version. After some debugging I found the problem was in the Row style options (Fields settings of the Format section) of the Isotope Filter Block view.
In order to work the “Provide default field wrapper elements” of Isotope Filter Block has to be unchecked, otherwise extra html tag will be included in the filters preventing them from work.
I hope this can help.
Comment #13
Dexter0015 commentedHi,
I had the same issue but I finaly figured out how to fix it.
In my case I had followed every advices mentioned in #5 except that I choosed to display each taxonomy term as a link.
It produced the following code :
So I tryed to displayed it as plain text, so the code became :
and Voilà!
Everything works now!
Hope it helps.
Versions : Drupal 7.26 & 7.x-2.x-dev
Comment #14
Chris Gillis commentedWhether you are using taxonomy terms or any other field value, all of the issues above can be solved in your view settings.
Under "Style Settings" tick all of the "Customize ___ HTML" checkboxes and choose "none" in the dropdown. Then untick the "Add default classes" checkbox.
Also make sure you untick any "link" options so the values display as plaintext.
This will get rid of the un-necessary tags that are messing up your selectors.
Comment #15
rli#14 did not really help me.
#12 is the answer.