Seems not working well enough.

I configured the module from the options in all possible ways, but it works only for the first 3 "mouseover", then becomes inactive. I have a menu with 4 items on display, but results can not it work for these 4 should refresh the page to continue working.

What do I do wrong? Is there a solution?

You can see how anomalous to http://www.davinci-escola-art.com

Comments

solotandem’s picture

The web site URL you refer returns a "Server not found" message. Can you reinstate this?

By "it works only for the first 3 "mouseover", then becomes inactive" are you saying that you have selected "mouseover" as the "event" to activate the accordion effect and the effect stops working after 3 invocations? If not, please help me understand your issue.

Have you tried other "events" to activate the accordion effect, such as "mousedown?" In the description on the settings form, you are warned to "Use "mouseover" at your own risk."

sakiland’s picture

I have similar problem but only in IE8. It doesn't depend of event type.
When install jquery_update Drupal module then have problem in Firefox 5 and IE8.

Whitout jquery_update in IE8 I got error

Invalid argument.
/sites/all/libraries/jquery.ui/ui/minified/ui.accordion.min.js line 13 charecter 5618

I'll keep testing.

sakiland’s picture

Version: 6.x-1.1 » 6.x-1.x-dev
Category: support » bug
Status: Active » Needs review
StatusFileSize
new436 bytes

Ok, problem exists when any first div after header is empty.

I has made workaround, but I'm not very happy with this solution :)
Probably, this is a bug of jQuery and I don't know is new version of jQuery has it.

linuxbcn’s picture

Try again the URL, please, http://www.davinci-escola-art.com
Yes, This is my problem. tested in Safari, Firefox and chrome.

Tnx!

linuxbcn’s picture

Well, I'll faind solutions too.
Tnx!

linuxbcn’s picture

I make somthing mote tests and the problem exist for all diferent efects. This week i'll try somthing with the patch and inform about it.
Tnx for all.

linuxbcn’s picture

I applied the patch

and this is the output

Patching file accordion_menu.module
Hunk # 1 FAILED at 203.
1 out of 1 Hunk FAILED - saving to file Rejects accordion_menu.module.rej

I command you utulitzat patch-b <p-EMPTY-1229734-3.patch the directory module.

What can I doo now?

solotandem’s picture

StatusFileSize
new713 bytes

Did you try to apply the patch against the dev release or 6.x-1.1? It appears it is intended for the former.

@sakiland, Does the attached patch work (similarly to your patch) if the div is empty (i.e. no child menu links)?

linuxbcn’s picture

I'll try another time, tnx!

linuxbcn’s picture

Hooo!

Anorther error ;(

$ patch -e < 1229734-empty-div.patch
patch: **** Only garbage was found in the patch input.

I have the version module Accordion menu 6.x-1.1.

Som alternative solution? I need this efect in a web.

linuxbcn’s picture

I try with this orders too:

patch < 1229734-empty-div.patch

And the same results ;(

Hunk #1 FAILED at 199.
1 out of 1 hunk FAILED -- saving rejects to file accordion_menu.module.rej

Before, I re-upload the module files in the server.

solotandem’s picture

Try
patch -p0 < 1229734-empty-div.patch
or
patch -p1 < 1229734-empty-div.patch

linuxbcn’s picture

Som other errors

Try

patch -p0 < 1229734-empty-div.patch

can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/accordion_menu.module b/accordion_menu.module
|index 2386b8e..45783bb 100644
|--- a/accordion_menu.module
|+++ b/accordion_menu.module
--------------------------

File to patch: accordion_menu.module
patching file accordion_menu.module
Hunk #1 FAILED at 199.
1 out of 1 hunk FAILED -- saving rejects to file accordion_menu.module.rej

or

patch -p1 < 1229734-empty-div.patch

patching file accordion_menu.module
Hunk #1 FAILED at 199.
1 out of 1 hunk FAILED -- saving rejects to file accordion_menu.module.rej
solotandem’s picture

The patches were written against the dev release, not 6.x-1.1.

sakiland’s picture

Sorry people for late answer. Yes, the patch was written against the dev release.
@solotandem, I have tried your patch and it hasn't worked. Look at http://jqueryui.com/demos/accordion/. There is message

The content element must be always next to its header.

solotandem’s picture

Thanks for the feedback. Funny thing, I tried the patch and it worked (or seemed to).

Is the jQuery comment implying that content must exist (even if empty), or just that if it does exist, it needs to be next to the header? What version of jQuery did you try this with?

linuxbcn’s picture

I have:

jQuery UI 6.x-1.5
jQuery Update 6.x-2.0-alpha1

sakiland’s picture

I use

Drupal 6 default (jQuery 1.2.6)
jQuery UI 6.x-1.5 (JQuery UI 1.6)

Currently, I have no enough time to test with other version of jQuery and jQuery UI. I will try in a few days.

Here complete text for jQuery UI document:

Make the selected elements Accordion widgets. Semantic requirements:

The markup of your accordion container needs pairs of headers and content panels:

<div id="accordion">
    <h3><a href="#">First header</a></h3>
    <div>First content</div>
    <h3><a href="#">Second header</a></h3>
    <div>Second content</div>
</div>

If you use a different element for the header, specify the header-option with an appropriate selector, eg. header: 'a.header'. The content element must be always next to its header.

@solotandem, Your patch works in Firefox 6, Chromium 6, Opera 11.51, but it doesn't work in IE8 (test via VirtualBox).
Description:
I have 6 menu items. First have submenus, other are with no submenu (so there is no div after header tag).
Test case 1:
If I click on first item, then on any of next 5, then again on first and any of next 5, (all this i can repeat many times) there is no problem.
Test case 2:
If I click on first item, then on any of next 5 and continue clicking on next 5 items i get error after 5-16 steps.
Test case 3:
If I do not click on first but on any of next 5, then I can click on any item of all 6 I get error.

linuxbcn’s picture

I can't find a solid solution.
Some similar module for make acordion efect?
Tnx!

linuxbcn’s picture

My secont last test whth the patch:

patching file accordion_menu.module
Hunk #1 FAILED at 199.
1 out of 1 hunk FAILED -- saving rejects to file accordion_menu.module.rej

And the file .rej:

***************
*** 199,209 ****
      $class = $subtree ? 'has-children' : 'no-children';
      $link = l($data['link']['link_title'], $data['link']['href']);
      $output .= '<' . $header . ' class="' . $class . '">' . $link . '</' . $header . '>';
-     $output .= '<div>';
      if ($subtree) {
        $output .= menu_tree_output($subtree);
      }
-     $output .= '</div>';
  
      if ($data['link']['in_active_trail'] == '1') {
        $active_menu = $i;
--- 199,209 ----
      $class = $subtree ? 'has-children' : 'no-children';
      $link = l($data['link']['link_title'], $data['link']['href']);
      $output .= '<' . $header . ' class="' . $class . '">' . $link . '</' . $header . '>';
      if ($subtree) {
+       $output .= '<div>';
        $output .= menu_tree_output($subtree);
+       $output .= '</div>';
      }
  
      if ($data['link']['in_active_trail'] == '1') {
        $active_menu = $i;
sakiland’s picture

I don't understand. Do you have problem with patch file? Here example

git clone --branch 6.x-1.x http://git.drupal.org/project/accordion_menu.git
cd accordion_menu/
cp /from_somewhere/empty-div-1229734-3.patch .
git apply -v empty-div-1229734-3.patch

solotandem’s picture

Status: Needs review » Fixed

Recent tests with the patch in #8 applied to latest commit on this branch indicates a undesirable behavior when an empty menu item is enabled followed by enabling a non-empty menu item. The area beneath the empty menu item expands and then contracts before expanding the non-empty menu item.

Marking this as closed unless someone can explain the issue better.

Please grab the latest dev release (created after this comment) or commit to 6.x branch, test, and report back.

Status: Fixed » Closed (fixed)

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