Problem with javascript and "#" in URL at use subscriptions_ui.module
kosilka - October 29, 2008 - 01:21
| Project: | Subscriptions |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
When i navigate to URL containing "#" symbol (for example, node/123#comment-32), majority javascripts, used in other modules, work incorrectly. For example - fivestar module, tabbed_block, standard drupal resizable textareas...
By exception of modules and blocks, and using Mozilla Firebug, i have come to a conclusion, that the reason of such behaviour - the subscriptions table inserted in a bottom of a node.
I did not begin to understand in drupal table API and in processable arrays in theme_subscriptions_ui_table function, i was helped by simple comment of a string #265 in subscriptions_ui.module.
if (isset($element[$elv]) && $element[$elv]['#access']) {
$row[] = drupal_render($element[$elv][$key]);
/* $headers[$eli] = $header_strings[$eli]; */
}I attach two screenshots - before fix problem, and after.
| Attachment | Size |
|---|---|
| before.jpg | 21.05 KB |
| after.jpg | 22.12 KB |

#1
P.S.:
Mozilla Firebug showed error in misc/tableheader.js, string containinig
var scrollLocation = $('td'+ location.hash).offset().top - $(e).height();.#2
Hmm, I don't quite understand what error you're reporting.
The table header is missing on both screenshots, the five-star widget seems to be in different states, and I don't see the connection to whether you have an '#' in your url or not.
#3
Ok. I have just installed drupal 6x.dev and subscription.module, only this kit. The bug has not disappeared. See video here : http://www.vimeo.com/2104524
upd: In first screenshot table header do not missing - he is empty (gray line).
#4
I'm getting the same error.
It happens when i click on a comment header link which directs you to example: "node/249#comment-17". Or when i fill out and submit a comment.
I have attached a screenshot. I'm using "6.x-1.0-beta3"
#5
Hmm, ok, but I still don't understand the cause of this problem.
The only JavaScript in Subscriptions is subscriptions_tableselect.js, which is used to dynamically show/hide additional checkboxes and comboboxes when a subscription is toggled. Please try emptying that file and check whether the problem persists. (Clean the browser's cache to make sure it's not cached by the browser!)
#6
Is this still an open issue?
Please help if you can...
#7
I've just released BETA6. Please upgrade to this version and let us know whether this is still a problem or not.
#8
Too bad no one was willing to get to the bottom of this.
Feel free to reopen if you want to pursue this based on RC1 or any later version.