Closed (fixed)
Project:
MySite
Version:
5.x-1.5
Component:
User interface
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Dec 2006 at 23:10 UTC
Updated:
30 Dec 2006 at 18:52 UTC
When choosing to add content to a MySite page, the folded options are made hyperlinks, making it impossible on some browsers to unfold the information within the folded content.
<fieldset class="collapsible collapsed"><legend><a href="#">Add User Blog</a></legend>
.... Shouldn't be a hyperlink.
Comments
Comment #1
agentrickardRob-
Can you report which browsers this fails on?
This bug actually comes from the core 'collapse.js' file and not from the MySite module.
It appears in both the 4.7.x and 5.x releases. For example, in Drupal 5 rc1:
// $Id: collapse.js,v 1.9 2006/12/10 09:05:47 unconed Exp $
lines 62-65:
Please open an issue on the Drupal project, 'javascript' component, with specific details of the affected browsers. You may want to include this note (or a link to it) in your issue.
Comment #2
robloachHmmm, it works in IE7, but not in Mozilla Firefox. I'm not entirely sure why this is happening as the collapsible content works everywhere else.
Comment #3
agentrickardFF2 or FF1.5?
My dev machine uses FF 1.5 on a Mac, and I don't have this problem.
Comment #4
agentrickardI think I misunderstood:
You mean that the collapse functions work in other parts of Drupal but not on your MySite page? Like http://example.com/mysite/2/content?
I need more detail.
Comment #5
robloachCorrect, I click on the title to expand the form in both the Add User Blog, and Add Forum Topic, and nothing happens. The form doesn't expand, no information is displayed. The collapsible forms work in all other parts of Drupal though, which is surprising. There isn't a problem in IE7, but it doesn't work in Firefox. It might just be my installation of Firefox if noone else is experiencing the problem.
Comment #6
agentrickardWhich Drupal version are you using? There are significant changes between collapse.js 1.8 and 1.9 (1.9 is released with Drupal 5rc1). I've been testing against v 1.8 (drupal 5 beta 2).
Also check the generated page source for /mysite/2/content and be sure that the collapse.js file is being called. If it's not, we need to figure out why.
Comment #7
agentrickardI just updated to Drupal 5rc1 and can't replicate this error (again, on Mac using FF 1.5).
Do the collapse elements work on mysite/2/view?
Comment #8
agentrickardI just noticed that collapse.js is getting included twice on the Add/Remove Content page. Try commenting out line 129 of mysite.module:
This might fix it on Add/Remove (and break it on View). If so, this means that the FormsAPI loads the collapse.js element, and I need to check for it's existence prior to loading it.
Comment #9
agentrickardI think I've tracked this down. Try this:
Edit line 129 of mysite.module to:
I think this will prevent the file from loading twice. if this fixes your problem, then the issue, is having two calls to the same .js file is confusing the browser.
Comment #10
agentrickardI have committed this change to 5.x.1.dev, as I think it is an error in the use of http://api.drupal.org/api/HEAD/function/drupal_add_js.
If you can verify that the fix from #9 works for you, I'll mark this as closed.
Comment #11
agentrickardMarking as fixed after no response.
Comment #12
agentrickardThis fix will go live with the next point release.