#views-tab-block_1
#views-tab-page_1

are shown at all times (the tabbed functionality defunct)

probably some contrib module has done it but I don't know how to go about debugging this

the caching, compression of css and js is disabled
and the link to each views display leads correctly to the correct anchor
thus its probably a javascript thing

This is all the scripts that get loaded on the view page

    <script type="text/javascript" src="/misc/jquery.js?T"></script>
<script type="text/javascript" src="/misc/drupal.js?T"></script>
<script type="text/javascript" defer="defer" src="/sites/all/modules/admin_menu/admin_menu.js?T"></script>
<script type="text/javascript" src="/sites/all/modules/dhtml_menu/dhtml_menu.js?T"></script>
<script type="text/javascript" src="/sites/all/modules/insertFrame/insertFrame.js?T"></script>
<script type="text/javascript" src="/sites/all/modules/nice_menus/superfish/js/superfish.js?T"></script>
<script type="text/javascript" src="/sites/all/modules/nice_menus/superfish/js/jquery.bgiframe.min.js?T"></script>

<script type="text/javascript" src="/sites/all/modules/nice_menus/nice_menus.js?T"></script>
<script type="text/javascript" src="/sites/all/modules/textsize/jquery.textsize.js?T"></script>
<script type="text/javascript" src="/sites/all/modules/jquery_plugin/jquery.cookie.min.js?T"></script>
<script type="text/javascript" src="/sites/all/modules/views/js/base.js?T"></script>
<script type="text/javascript" src="/sites/all/modules/views/js/tabs.js?T"></script>
<script type="text/javascript" src="/sites/all/modules/views/js/ajax.js?T"></script>
<script type="text/javascript" src="/misc/jquery.form.js?T"></script>
<script type="text/javascript" src="/misc/collapse.js?T"></script>
<script type="text/javascript" src="/misc/textarea.js?T"></script>

<script type="text/javascript" src="/misc/tabledrag.js?T"></script>
<script type="text/javascript" src="/misc/autocomplete.js?T"></script>
<script type="text/javascript" src="/sites/all/modules/views/js/dependent.js?T"></script>
<script type="text/javascript" src="/sites/all/modules/jquery_ui/jquery.ui/ui/minified/ui.core.min.js?T"></script>
<script type="text/javascript" src="/sites/all/modules/jquery_ui/jquery.ui/ui/minified/ui.datepicker.min.js?T"></script>
<script type="text/javascript" src="/sites/all/modules/finder/modules/finder_autocomplete/finder_autocomplete.js?T"></script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
jQuery.extend(Drupal.settings, { "basePath": "/", "admin_menu": { "margin_top": 1, "position_fixed": 1 }, "dhtmlMenu": { "slide": "slide", "clone": "clone" }, "nice_menus_options": { "delay": 800, "speed": 1 }, "views": { "ajax": { "id": "#views-ajax-pad", "title": "#views-ajax-title", "defaultForm": "\x3cdiv class=\"message\"\x3eClick on an item to edit that item\'s details.\x3c/div\x3e" } } });
//--><!]]>
</script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
  var textsizeElement = "body";
  var textsizeElementClass = "";
  var textsizeIncrement = 5;
  var textsizeNormal = 75;
  var textsizeMinimum = 50;
  var textsizeMaximum = 150;
  var textsizeIncrementDisplay = 7;
  var textsizeNormalDisplay = 100;
  var textsizeDisplay = 1;

//--><!]]>
</script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
$(document).ready(function(){$("#ad,#dd").datepicker({ dateFormat: "dd-mm-yy" });});
//--><!]]>

</script>
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

merlinofchaos’s picture

Hit ctrl-shift-J (if in Firefox) to get to the javscript console. If there is a lot of stuff there, clear it and then reload the page. Tell me if an error appears here.

GiorgosK’s picture

Priority: Normal » Minor

some warnings but they seem to be unrelated

Warning: Error in parsing value for 'filter'.  Declaration dropped.
Source File: sitecom/sites/all/modules/admin_menu/admin_menu.css?n
Line: 28

Warning: Error in parsing value for 'overflow'.  Declaration dropped.
Source File: sitecom/sites/all/modules/views/css/views-admin.css?n
Line: 141

Warning: Error in parsing value for 'white-space'.  Declaration dropped.
Source File: sitecom/sites/all/modules/views/css/views-admin.css?n
Line: 602

Warning: Error in parsing value for 'white-space'.  Declaration dropped.
Source File: sitecom/sites/all/modules/views/css/views-admin.css?n
Line: 603

Warning: Error in parsing value for 'filter'.  Declaration dropped.
Source File: sitecom/sites/default/files/css/css_162bd3ff50ca60c27536ab5ec5685ab9.css
Line: 1

firebug does not report any errors either

I do have http://drupal.org/project/cck_fieldgroup_tabs
and http://drupal.org/project/tabs
enabled but they did not create any problem when I first
installed and used ... and I did disable the modules and tested
but still tabs don't work for views UI

lets not worry about it though its minor issue
the contrib offender will appear soon enough

leenyx’s picture

Same issue here, I can't figure it out but it's very annoying on the Calendar view as it has many displays.

Anyone looking at this?

thanks

leenyx’s picture

wow, I've just run updates (nothing updated) and cron and the displays are not tabbed as normal!!?

I have been cleaning up some animations that I had with jquery cycle plugin and that seems the most likely suspect...

yhahn’s picture

I've reproduced this problem locally when both Views 2.7 and jQuery UI 1.3 (using jQuery UI 1.6) are enabled. It appears that just the ui.core.min.js is enough to trigger the problem, though I haven't looked into it further.

If I get a chance I will poke around the Views JS and see what the conflict is.

yhahn’s picture

Well... a small fix is not looking too promising as the tabs.js in Views looks like a rather old instance of the jquery UI tabs code that exists today. The main problem looks like the $.ui object's API has changed rather significantly so sharing the namespace is a no go.

Next steps:

- See if a more current version of the UI tabs.js will accommodate a parallel install of jquery UI
- If not, see if there is a way to run tabs js needed by Views parallel to the jquery UI namespace

GiorgosK’s picture

Category: support » bug

Should we mark this as a minor bug then ?

yhahn’s picture

Version: 6.x-2.7 » 6.x-2.x-dev
Status: Active » Needs review
FileSize
728 bytes

Well, there are "right" solutions and then you could just use the bazooka on the front door.

This patch applies against 2.x, 3x.

merlinofchaos’s picture

Hmm. Young's patch is tempting, though that won't help us if soemthing else (like a theme) is also adding jquery UI, will it?

yhahn’s picture

Status: Needs review » Needs work

That's a good point - I'll look into a proper update of tabs.js and let you know whether that will be problematic.

I am a bit skeptical of how robust that will be with themes not utilizing the API module/library given that there are 2 rather widely used versions of jq UI (1.6, 1.7)

yhahn’s picture

Status: Needs work » Needs review

Ok, I've done some more investigation here. Here's what I can say about the typical "double loading" scenario of jquery UI

1. views_include() loads tabs.js where $.ui and $.ui.tabs are instantiated
2. jquery_ui (module) or a theme loads UI core again, often packed, and blows away $.ui as well as the the widget plugins that have been instantiated previously

One fix to this is to go into the later JS includes and replace

$.ui = {

with

$.ui = $.ui || {

But this is entirely out of Views' control and the jQuery UI module for that matter (as the actual jquery UI library is downloaded and installed by the user). It also seems unlikely to me that the theme will address this on its own as most themers will use the packed version of jquery UI directly.

I'd love to know if there's a good solution to this but in general it seems like multiple inclusions of jquery ui core is bad news.

GiorgosK’s picture

#8 applies in my case

xmark99’s picture

I have the same issue and it started when I installed the jQuery Update module to update jQuery to 1.3.2 - I have lots of things that rely on the latest version of jQuery. I can't figure out what the conflict is. Or is it that the Views module is not up to par with the latest jQuery 1.3.2?

Anyone figured out a workaround or a solution for this scenario yet?

GiorgosK’s picture

try patch from #8

xmark99’s picture

I just tried #8 and didn't work for me. It makes sense as I don't have jQuery UI installed. Somehow calling the tabs.js functions is not so compatible with jQuery 1.3.2 - Anyone is having the same issue?

yhahn’s picture

Frick... we'll need two version of tabs.js and probably do something like:

if (module_exists('jquery_ui')) {
  jquery_ui_add(array('ui.tabs'));
}
else if (module_exists('jquery_update')) {
  views_add_js('tabs_1.3');
}
else {
  views_add_js('tabs');
}

*puke* : (

Anyone have any bright ideas / anything to add before I write this?

merlinofchaos’s picture

Yes, let's rewrite our tabs.js to use our own private namespace so we *can't* conflict with jquery UI.

yhahn’s picture

Sounds good, will work on a patch to put tabs under the Drupal.Views namespace (like the other js in Views).

yhahn’s picture

FileSize
29.41 KB

Ok, I got a chance to work on this. Here's the patch -- tested in conjunction with jquery_ui, but not with jquery_update. Would love someone to give it a spin.

Patch generated from checkout of DRUPAL-6--3. Applies successfully against Views 2.8 as well.

sarvab’s picture

Ran into this issue and the above patch worked great for me. Haven't noticed any issues.

Stalski’s picture

Ran it onto DRUPAL-6--3 checkout and worked nicely. thx yhahn

EclipseGc’s picture

Current patch appears to work great until you try to add a new display. You have to refresh the page to see the new tab. :-(

Eclipse

EclipseGc’s picture

Status: Needs review » Needs work
yhahn’s picture

Status: Needs work » Needs review
FileSize
30.57 KB

The attached patch should address the new display creation problem. Would love some testing from others.

Per usual, patched against DRUPAL-6--3, also applies against DRUPAL-6--2.

GiorgosK’s picture

I just applied the latest patch and display creation works again - tabbed interface is as expected

had to clear all previous applied patches which were causing other sideeffects (you can use a clean views installation for that)

EclipseGc’s picture

I tested this pretty heavily in both firefox and safari, no problems that I can see. Someone needs to give it the IE "ok" but this is looking REALLY promising. Leaving this as "needs review" until we can get IE tested.

jyve’s picture

Just tested this on IE7, and worked perfectly. Sounds like a winner!

bohz’s picture

patch in #24 working seamlessly.
- views 6.x-2.8
- jQuery Ui 6.x-1.3

Thanks!

[edit: IE8, Chrome 4.0249 and FF3.6 on XP and Windows 7]

detot’s picture

works awesome here too, commit?

tms8707056’s picture

What's the status? Is this getting committed?

dawehner’s picture

No. Its still on needs review, which means also needs testing and especially needs review of the code.

dawehner’s picture

@yhahn
Could you say, how hard it will be later to port the tabs with your patch to jquery ui? This should be done in drupal7.

yhahn’s picture

@dereine

If I understand correctly the tabs.js in Views is a very early version of the jQuery UI tabs (like, circa 2 years ago or something). I think it should be straightforward to just remove tabs.js in the 7.x branch and use jQuery UI tabs directly.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Manual testing of the ui without jquery ui: works fine
Manual testing of the ui with the jquery ui: works fine.

Code is just c&p, so

pvasili’s picture

The #24 not working :(
Win 7(64), FF3.6 and IE8, views 6.x-2.8 and last views 6.x-2.x-dev, garland
In the section head is only one script dependent.js

pvasili’s picture

Status: Reviewed & tested by the community » Needs work

Opps /admin/build/views/tools - Disable javascript with Views needs to disable!

pvasili’s picture

Status: Needs work » Reviewed & tested by the community
merlinofchaos’s picture

Status: Reviewed & tested by the community » Fixed

Fixed in all 6.x branches. We should probably open another issue about this for 7.x -- but there, I think we actually want to totally remove tabs.js because Drupal comes with jQuery UI and we should be able to use the core implementation.

Status: Fixed » Closed (fixed)

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