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

conortm’s picture

Assigned: Unassigned » conortm
Status: Needs review » Fixed

Thanks for this! I've applied a modified version to the latest 6.x dev. If possible, please test and report any further issues. Thanks!

hanoii’s picture

Status: Fixed » Active

Actually, 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.

conortm’s picture

Status: Active » Fixed

Thanks 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!

Status: Fixed » Closed (fixed)

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