Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've configured my Tardis block to use the Accordion Year link style, but I'm not getting an accordion... On inspecting the generated html/css, I find:
<li class="tardis-link-year tardis-year-2015">
<h3>
<a href="javascript:void(0);">2015</a>
</h3>
What could be going wrong? Are there any prerequisites in the theme to enable this to work?
Comment | File | Size | Author |
---|---|---|---|
#23 | canvas.png | 21.11 KB | atiras |
#21 | tardis accordion html.TXT | 2 KB | atiras |
#21 | tardis normal link html.TXT | 1.99 KB | atiras |
#21 | tardis no link html.TXT | 1.85 KB | atiras |
#12 | tardis.js_.txt | 940 bytes | luco |
Comments
Comment #1
atiras CreditAttribution: atiras commentedComment #2
atiras CreditAttribution: atiras commentedComment #3
luco CreditAttribution: luco commentedhello,
what do you get instead of an accordion? have you generated more than one TARDIS block?
please provide me all steps to reproduce the problem.
if you have a link to your live or testing website, that's super helpful.
marking as support request since it works as designed.
cheers,
Luciano
Comment #4
atiras CreditAttribution: atiras commentedI have generated one tardis block and no tardis page (as I am using a Custom view). Theme is a paid-for theme based on Bootstrap3.
Tardis config is in attached file.
Development website isn't accessible, I'm afraid.
Instead of an accordion I get:
Monthly archive
2015
January
2014
September
August
July
May
April
March
January
2013
September
Comment #5
luco CreditAttribution: luco commentedI don't get it. according to your settings, it was supposed to work.
try to change from accordion to normal or no link. save the settings, clear all caches, reload the page where the block is. then switch back to accordion. save the settings, clear all caches, reload the page where the block is.
also have you tried to change the theme? revert to Bartik and see what happens. paid themes sometimes approach things differently, which means they might have custom code that doesn't, well, play nice with Drupal's.
by the way, the code you pasted here looks different from the one output by the module.
I understand you've signed an NDA, but maybe you can create a sandbox environment without anything from your client's project, something like testing.yoursite.com. that ought to speed things up. ;)
cheers
Comment #6
atiras CreditAttribution: atiras commented1. I've changed the theme to Bartik and it works.
2. I've changed the theme to Bootstrap3 (the basic free version) and it doesn't work -- so it's some interaction with Bootstrap that's the problem, not with the paid theme, which should make it easier to investigate.
3. "try to change from accordion to normal or no link. save the settings, clear all caches, reload the page where the block is. then switch back to accordion. save the settings, clear all caches, reload the page where the block is. " -- doesn't help.
Problem with providing access to a devt environment isn't an NDA -- the devt environment is behind a firewall... and the paid theme is only under evaluation so can't be made live yet. If I can find time, I'll try to set up an accessible sandbox environment but it might not be for a few days...
Comment #7
luco CreditAttribution: luco commentedI'm sorry, but I just don't have time to look into why a Bootstrap theme won't work right now. it is an interesting issue - and a bug nevertheless - but I can't promise a fix in the near future.
please try a different theme, like Zen or Omega. they have clean slate versions that make theming a website much easier.
or, if you find a solution, create a patch and I'll revise it.
cheers
Comment #8
atiras CreditAttribution: atiras commentedI'm sticking with Bootstrap, and won't use this module. I have, however, changed this back to a bug report, which is how it started out. I also don't have time (or the skills) to try to fix it.
Comment #9
atiras CreditAttribution: atiras commentedComment #10
luco CreditAttribution: luco commentedfound it: Bootstrap doesn't print item-list DIVs, which are essential for TARDIS to work properly. such DIVs are a common Drupal element, which is why I chose to use them in the first place.
as I found out this is not a bug per se, but rather an improvement for TARDIS to be compatible with a greater range of themes.
therefore I'm working to improve my module. you're welcome.
next time, try to either be more involved or grateful (or both). there's module maintainers who'd've turned you down for less - and if you insisted, they'd report you.
Comment #11
atiras CreditAttribution: atiras commentedI wasn't being ungrateful, or insisting on anything, just explaining why I won't be using the module, and why I can't help improve it. I put as much effort as you asked for into providing information to help diagnose what was happening -- even offered to spend time setting up a sandbox environment for you to access -- until you told me:
It's great that you've subsequently identified what's happening, and intend to improve the module as a result. I look forward to trying it again when you've done so.
Comment #12
luco CreditAttribution: luco commentedhello,
could you please test the attached file?
rename it to tardis.js and place it in the tardis/js folder - but back yours up first.
as soon as you report, I'll be able to mend the module and release a new version.
cheers
Comment #13
atiras CreditAttribution: atiras commentedOk -- this is on my todo list for this weekend.
Comment #14
atiras CreditAttribution: atiras commentedI'm sorry -- I've tried the new file (including in a vanilla Bootstrap 3 environment) and I get the same behaviours as before. The html generated for the relevant block is:
What else can I tell you to help?
Comment #15
luco CreditAttribution: luco commentedthanks for testing!
the HTML hasn't changed, only the JS used to make the accordion effect.
please access yoursite.com/admin/config/development/performance and uncheck Aggregate JavaScript files (if it isn't already) then click Save configuration.
next, click Clear all caches at the top, but only if Aggregate JavaScript files is already unchecked.
if that doesn't work, access yoursite.com/sites/all/modules/tardis/js/tardis.js and see if it matches the JS I posted above.
cheers
Comment #16
atiras CreditAttribution: atiras commentedUnaggregated Javascript files == no change
Cleared caches just in case == no change
.js file matches the one you provided
All the above done in a vanilla Bootstrap environment.
WebDeveloper InspectElement in Firefox gives me this for the jQuery :
on this html line:
<li class="tardis-link-year tardis-year-2015"></li>
Comment #17
luco CreditAttribution: luco commentedok, upon closer inspection of your HTML, I see that the links inside H3s don't have
href="javascript:void(0);"
like they were supposed to - instead, they have regular links to/archive/[year]
.please re-check your TARDIS block settings. ;)
Comment #18
atiras CreditAttribution: atiras commentedHi -- my settings are still as they were at comment #4
Comment #19
luco CreditAttribution: luco commentedwell, this is odd.
in your code from #4, H3s have
href="void(0);"
whereas in your HTML from #14, it'shref="/archive/[year]"
.please experiment with Year link style set to No link, Accordion and Normal link. show me the HTML output by each option, preferably in separate text files, and we'll proceed from there, ok?
cheers
Comment #20
atiras CreditAttribution: atiras commentedOK -- busy today so it might not be until the weekend .
Comment #21
atiras CreditAttribution: atiras commentedOK. I have double checked that I'm using your new version (from comment #12) and experimented with No link/normal link/accordion, all without js files aggregated. I recreated the block using the settings from #4 with one change: I'm now using a tardis page rather than a custom view (shouldn't make any difference but it eliminates one factor just in case).
Three text files attached...
Comment #22
luco CreditAttribution: luco commentedok, the last version (tardis accordion html) has
<h3><a href="javascript:void(0);">[year]</a></h3>
as expected.how does the block work in that case?
Comment #23
atiras CreditAttribution: atiras commentedAlas, it doesn't function as an accordion. Same appearance as in comment #4.
Comment #24
luco CreditAttribution: luco commentedintriguing... I'll recruit some workmates to test in their PCs and report back.
meanwhile, if you could put up a temporary test environment that'd be very helpful. you could PM me the login info.
anyway thanks for your cooperation so far! :) we'll squish this bug.
Comment #25
atiras CreditAttribution: atiras commentedOk, I won't be able to set the sandbox up quickly as I'm run off my feet with other stuff at present -- will let you know when it's done but it might take a week or so -- sorry.
Comment #27
luco CreditAttribution: luco commentedhello,
I recruited some workmates and they tested my fix. everything went smoothly, but if you encounter this problem again feel free to create a new issue, ok?
thanks again for bringing this to my attention.
cheers
Comment #28
atiras CreditAttribution: atiras commentedOK -- I still haven't had time to set up a sandbox.
Can you tell me which version of Bootstrap it's been tested with -- I'm using Bootstrap 7.x-3.1-beta2+2-dev.
Thanks
Helen
Comment #29
luco CreditAttribution: luco commentedI tested with the latest stable, but that shouldn't be a problem.
cheers