Closed (fixed)
Project:
Admin:hover
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
8 Feb 2010 at 22:38 UTC
Updated:
12 Mar 2010 at 05:20 UTC
I am using a theme that holds a lot of blocks, and some do not have any admin links according to the module.
The problem is that the module may be returning the JSON object array with keys that are non-consecutive, and that's making the xxx.length property not to work somehow. I haven't gone deeply into this but it seemed that way debugging the JS code.
Iterating over the items in the response in a different way avoid this problem, just leaving this here for future reference (and probably to myself as well) as right now I think I am not going to use this module as it has important issues that need to be sorted before I can really use it.
line 12
for (i = 0; i < items.length; i++) {
for
for (var i in items) {
Comments
Comment #1
conortm commentedThanks for this! I've applied a modified version to the latest 6.x dev. If possible, please test and report any further issues. Thanks!
Comment #2
hanoiiActually, I think this is active. I looked at what you commited and this fixed was against the JS of the code, and that wasn't changed.
Comment #3
conortm commentedThanks for checking it out! However, the issue originated in the admin_hover.module file (line 203). I updated that foreach loop to use an iterator that only gets updated if there are available links... Anyway, that took care of the out-of-sequence array indices, and hence, in the javascript file... Hope that explains it!
If you're still having an issue with it, please let me know! Thanks!