If enabled it shows "true" or "false" as first item in the select list. Depends on "Show header instead of the active item" setting.

2013-05-12_103349.png

Both looks totally wrong to me. I expect - Please select -

CommentFileSizeAuthor
2013-05-12_103349.png1.55 KBhass
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hass’s picture

For me it looks the like header is not detected. This is visible as the header is still shown. Should it removed or moved into the selectbox? I know I have a custom menu block. HTML is not like standard core (themed).

<aside id="block-system-navigation" class="block block-system contextual-links-region block-menu ym-noprint">
      <h6>Navigation</h6>
  <nav class="content ym-vlist">
    <ul class="ym-menu tinyjs l_tinynav1">
<li class="first leaf"><a href="/drupal7/node/1" title="Description of bivaprabrutr.">Adding my own event tracking code</a></li>
<li class="collapsed"><a href="/drupal7/node/3" title="Description of slecrucle.">Level 1</a></li>
<li class="collapsed"><a href="http://www.example.com/" title="Description of shujugotuv.">shujugotuv</a></li>
<li class="collapsed"><a href="/drupal7/" title="Description of cliprucri.">cliprucri</a></li>
<li class="collapsed"><a href="/drupal7/node/5" title="Description of uamehost.">Level 3</a></li>
<li class="collapsed"><a href="/drupal7/node/add">Add content</a></li>
<li class="last leaf"><a href="http://www.example.com/" title="Description of vaslumipr.">vaslumipr</a></li>
</ul>
<div class="tinynav-wrapper"><select id="tinynav1" class="tinynav tinynav1"><option>false</option><option value="/drupal7/node/1">Adding my own event tracking code</option><option value="/drupal7/node/3">Level 1</option><option value="http://www.example.com/">shujugotuv</option><option value="/drupal7/">cliprucri</option><option value="/drupal7/node/5">Level 3</option><option value="/drupal7/node/add">Add content</option><option value="http://www.example.com/">vaslumipr</option></select></div>  
</nav>
</aside>
hass’s picture

This happens if you use tinynav 1.1.

Hanpersand’s picture

Version: 7.x-1.x-dev » 7.x-1.2

This is happening for me, too, and I'm not using the dev branch of the module. I'm using version 1.2. The first item is "True" or "False".

I got the library from its GitHub page here: https://github.com/viljamis/TinyNav.js

Is there a fix for this?

I'm also using a custom menu block, but it's not a dropdown. Just a simple, single-level menu block.

Thank you!

hass’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
btopro’s picture

Try using the fall-back library instead of the github installed libraries one. See if that helps at least in narrowing things down

Hanpersand’s picture

Ah, yes. That totally worked. I deleted the tinynav library from sites/all/libraries, and it fell back to the drupalized tinynav js file in the module, and it works fine now. Thank you.

It'd be great if you could put a temporary note on the project page that says something like: "Note: Please use version 1.2 with its included fallback js file instead of installing tinynav from GitHub as there is a known bug that we are working to resolve
." or something. I do see that you've made mention of adapted code and a patch up for review, but t wasn't clear to me that I didn't have to install tinynav and that it was better for quick off-the-shelf use if I didn't use the Github library. The one tutorial I saw, which was using it with Omega, instructed to install the library from Github, so I can see others getting confused.

Thanks again!

btopro’s picture

hmm... good point, sorry been awhile since I've attended to this project so that's a good idea.

Adding to the front page

btopro’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)

Fallback method works

hass’s picture

Status: Closed (works as designed) » Active

What is the fixing commit?

btopro’s picture

Status: Active » Closed (works as designed)

We don't support the external library anymore. Documentation.

hass’s picture

But the fork was always completly out of date or has it updated? Why are you reinventing the wheel?

btopro’s picture

as per project front page:

Because of improvements to the original code-base as well as our community's authorization to fork tinynav.js and include under GPL the original code-base no longer functions as a library as cleanly as it once did. If you want to use the original library, stick to version 1.1 or lower of tinynav. If you want to utilize the enhancements in 1.2+, utilize the built in library instead of the downloadable one.
See issue: #1992816: Shows FALSE or TRUE as first item

#1942604: Drop support for original Library / libraries implementation
https://www.drupal.org/node/1942604#comment-8015807 -- we have to patch the library already to make it work w/ drupal. The maintainer has authorized us to include a fork. This is a ridiculously small library with targetted purpose and with all the other projects out there doing similar things this has ease of implementation / installation / use as a selling point (if any).

We can sync back up with the Tinynav library if need be but at the time, this also supported multiple levels of nesting where tinynav didn't and ran ahead of the supported tinynav release thanks to patches from this queue and theres.

If you are willing to patch this to utilize a 3rd party library effectively again then please do, there is still support in the current repo for the library based version but it is a fallback and based on all issue reports, non-functioning OOTB.