Download & Extend

JavaScript error occurs after displaying the /admin/build/block in an overlay using AJAX.

Project:Drupal core
Version:7.x-dev
Component:block.module
Category:bug report
Priority:normal
Assigned:paul.lovvik
Status:closed (fixed)
Issue tags:D7UX

Issue Summary

I used the popups module to display the /admin/build/block page in a popup window. This scheme uses AJAX to load the page contents and integrates the page into the existing DOM. When the overlay is dismissed, the JavaScript code that is associated with the block module remains, including the Drupal behaviors. When other popup pages are viewed after this, several JavaScript errors occur due to Drupal.tableDrag or Drupal.tableDrag.row not being defined.

This patch protects the JavaScript from such an error. I have tested it on FF3, IE6, and IE7 so far.

AttachmentSizeStatusTest resultOperations
block_overlay.patch1.12 KBIdlePassed: 11885 passes, 0 fails, 0 exceptionsView details

Comments

#1

Status:needs review» needs work

It seems like this is going to affect any page using tabledrag.js - so we should either fix it in tabledrag.js itself, or if that's not possible, fix it across core where the same issue is likely to occur. While I'm pretty ignorant of javascript, I'm also a bit surprised it's not possible to mess with DrupalBehaviours and unbind the block tabledrag from the code adding/removing the overlay.

Minor point, ajax should be capitalised.

#2

@paul.lovik, does this issue remain? If not, please close it. If it does, please pursue it.

#3

Status:needs work» closed (fixed)

No longer an issue, closing.

nobody click here