Closed (fixed)
Project:
Homebox - Individual user dashboards
Version:
6.x-3.0-beta5
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Feb 2011 at 14:59 UTC
Updated:
16 Nov 2011 at 14:01 UTC
Jump to comment: Most recent file
Comments
Comment #1
brianV commentedThanks for posting this in it's own issue. I cannot reproduce in my test environments here, but hopefully we can collect confirming reports from others here.
Comment #2
Seraphin42 commentedHi,
I confirm the problem of g5605. I installed Homebox, and I created a "dashboard".
I added some blocks and when I go to my dashboard, I can't use javascript.
Here the debug from Chrome console :
Uncaught TypeError: Cannot call method 'match' of undefined
Line 87 Homebox.js :
if ($(this).parent('.homebox-column-wrapper').attr('style').match(/width: 100%/i)) {I have no problems of javascript on the Test Homebox generated by the module except these notices :
Hope it can help you.
Thank you a lot for your work on this great module ;-)
Comment #3
brianV commentedWhat browsers are you using?
$(this).parent('.homebox-column-wrapper').attr('style') should be a string corresponding to the value of 'style' attribute on the selected element. match() checks to see if the following regex is within that string, and works properly on Firefox 3.6.13.
Documentation for match() is here: http://www.w3schools.com/jsref/jsref_match.asp
This may be a browser-specific bug. It would have been introduced with this issue: http://drupal.org/node/1037968
I may just have to revert the above issue temporarily until we find a better way to match the width statement than 'match()'.
Thoughts?
Comment #4
g5604 commentedI am using chrome, but I checked in firefox and the problem persists.
Comment #5
brianV commentedCan you tell me the versions of each?
Comment #6
Seraphin42 commentedTested with firefox 3.6.13 (Mac OS X) : Erreur : $(this).parent(".homebox-column-wrapper").attr("style") is undefined
Fichier Source : https://xxx.xxx.com/sites/all/modules/homebox/homebox.js?lgnexa Ligne : 87
Tested with Chrome 9.0.597.102 (Mac OS X) : Uncaught TypeError: Cannot call method 'match' of undefined Line 87 Homebox.js :
if ($(this).parent('.homebox-column-wrapper').attr('style').match(/width: 100%/i)) {
But I haven't problems with the Homebox example module.
Comment #7
brianV commentedCan you test the below patch, and tell me if that resolves the issue?
Comment #8
Seraphin42 commentedSorry, it doesn't work on both Chrome and Firefox ...
var style = $(this).parent('.homebox-column-wrapper').attr('style');
if (style != '' && style.match(/width: 100%/i ) !== null) {
Uncaught TypeError : Cannot call method 'match' of undefined
$(this).height('auto');
maxHeight = Math.max($(this).height(), maxHeight);
}
Comment #9
brianV commentedOk, I think I know what is happening.
Please go to the 'settings' page for your homebox, and enter custom column widths for your columns. When that is done, does dragging start to work in your homebox?
Edit: Please remove the above patch before testing what I wrote in this post.
Comment #10
Seraphin42 commentedYeah, it works.
I've got these errors in my custom block :
Notice: Undefined property: stdClass::$module in homebox_block_edit_form_builder() (line 681 of /data/www/mastermindv2/sites/all/modules/homebox/homebox.module).
Notice: Undefined property: stdClass::$key in homebox_block_edit_form_builder() (line 686 of /data/www/mastermindv2/sites/all/modules/homebox/homebox.module).
Notice: Undefined property: stdClass::$key in homebox_block_edit_form_builder() (line 689 of /data/www/mastermindv2/sites/all/modules/homebox/homebox.module).
Notice: Undefined property: stdClass::$key in homebox_block_edit_form_builder() (line 691 of /data/www/mastermindv2/sites/all/modules/homebox/homebox.module).
Comment #11
g5604 commentedentering custom column widths for all columns, fixes everything for me :)
Comment #12
brianV commented@Seraphin42: That is an unrelated issue. Please post in a separate issue.
@Seraphin42, g5605: Attached is a patch that should fix this issue. I would appreciate it if you can test it; if it works for you, I will commit it. It should allow drag and drop to work even if custom widths are not specified.
Comment #13
Seraphin42 commented@brianV : it works for javascript, i can drag boxes and use javascript.
BUT, my first column actually does 100% of the screen, and the two other boxes are below the first box.
Here are errors displayed after the patch :
Notice: Use of undefined constant PHP_ROUND_HALF_DOWN - assumed 'PHP_ROUND_HALF_DOWN' in homebox_build() (line 414 of /data/www/mastermindv2/sites/all/modules/homebox/homebox.module).
Warning: Wrong parameter count for round() in homebox_build() (line 414 of /data/www/mastermindv2/sites/all/modules/homebox/homebox.module).
Notice: Use of undefined constant PHP_ROUND_HALF_DOWN - assumed 'PHP_ROUND_HALF_DOWN' in homebox_build() (line 414 of /data/www/mastermindv2/sites/all/modules/homebox/homebox.module).
Warning: Wrong parameter count for round() in homebox_build() (line 414 of /data/www/mastermindv2/sites/all/modules/homebox/homebox.module).
Notice: Use of undefined constant PHP_ROUND_HALF_DOWN - assumed 'PHP_ROUND_HALF_DOWN' in homebox_build() (line 414 of /data/www/mastermindv2/sites/all/modules/homebox/homebox.module).
Warning: Wrong parameter count for round() in homebox_build() (line 414 of /data/www/mastermindv2/sites/all/modules/homebox/homebox.module).
Comment #14
brianV commentedd.org has been down, so I haven't had a chance to post this, but I pushed the above patch since I am very sure it fixes this problem:
http://drupal.org/cvs?commit=500606
Please re-open if you experience this again.
Comment #15
brianV commentedOops - that Constant isn't available until PHP 5.3.0. I've pushed another commit that uses a workaround to accomplish the same functionality, but is compatible with PHP 5.2.X.
http://drupal.org/cvs?commit=500642
*now* this should be fixed.
Comment #16
rod35 commentedok with your patch on Chrome
Thanks a lot
Comment #17
g5604 commentedthanks working well now.
Comment #18
Seraphin42 commentedIt works for me too. Thanks !
Comment #20
Michsk commentedCan this be ported to 6.x-2.x dev ? Experiencing exactly this issue.
Comment #21
Michsk commented1062360-homebox-js-not-working-rev2.patch
Also works for / fixes 6.x-2.x dev.
Comment #22
Michsk commentedDrag and drop works but we still log Wrong parameter count for round()
Comment #23
klaashobo commentedHi there,
I really don't understand. I have installed homebox on a clean installation of Drupal 6.2x and cannot move any part of the panels. In all the panels there are four buttons, but they all seem not to work. I have filled all columnwith with a custom % and still do not get working buttons or am able to move the panels. Is there something that I can forget of that I misconfigured?
Hope you will try to help me out here,
Comment #24
mxmilkiib commentedApplying the additional code in the patch to the either 6.x-3.0-beta or 6.x-3.x-dev fixes the problem but, as Iasac notes, there is an error message displayed (on a three column page);
Reopening under 6.x-3.x-dev so this can be looked at, ta. Going back to custom column widths for now.
@klaashobo; If you have tried giving custom column widths then this issue might not be the cause of your problem. What versions of jQuery and jQuery UI do you have installed?
Comment #25
HJulien commentedI am not able to move any blocks into my homeboxes. I can move them into the columns, but when I save, then move back to the disabled section. It doesn't matter which column, which block or which homebox page. I set the columns width and that didn't make a difference. I've checked every single permission and everything matches with those blocks already in the homeboxes. Even the most basic Drupal-provided blocks can't be added.
This patch above - will it solve this issue? I am using the current recommended release - is there a solution to this included in the dev version?
I love this module and I really want to be able to continue using it but it's stuck and I can't move forward in my work with it like this.
Any help would be appreciated. Thank you!
Comment #26
HJulien commentedI'm still stuck. I'm thinking I might try removing all of the blocks currently in the homeboxes but that might not make any difference at all given I can't save any blocks. Does Flush remove all of the blocks? Does it clear anything else? I can't find any documentation on this feature.
The only other thing I can think of is to uninstall the module and start with a fresh copy but I'm concerned about all of the rebuilding I'd need to do since the homeboxes are the central connectors of the website. This would be my last resort....
What does Flush do?
Comment #27
HJulien commentedUpdate on previous 2 comments:
Flushing the settings did nothing. I couldn't even remove blocks from the homebox pages. I uninstalled homebox completely and then installed a fresh copy of 6.x-3.0-beta2. I can create a new page but can't add anything to it - not even to the test page.
I'm looking for ideas on what to do now. Is the development version a better option to try? Is there another module I can use that provides functionality?
So far I haven't gotten any feedback on this and I'm really disappointed.
Comment #28
HJulien commentedI've tried disabling most of my modules but still it's not working. Is it possible that this module is out of sync with the available jquery_ui module? I had 6.x-1.4 and just updated to 6.x-1.5 to see if that made a difference. None. How about the jquery download itself? I have 6 so I didn't update that.
There are discrepancies between what is available and what your documentation says is required. I never had 6.x-1.3 since it wasn't available at the time but 6.x-1.4 worked at the beginning.
I'm just bashing my head here and will give up soon.
Comment #29
drufiz commentedHi,
how do I install the patch 1062360-homebox-js-not-working.patch ?
Comment #30
drufiz commentedNotice: Undefined property: stdClass::$module in homebox_block_edit_form_builder() (Zeile 688 von /var/www/web537/html/kle/sites/all/modules/homebox/homebox.module).
Notice: Undefined property: stdClass::$key in homebox_block_edit_form_builder() (Zeile 693 von /var/www/web537/html/kle/sites/all/modules/homebox/homebox.module).
Notice: Undefined property: stdClass::$key in homebox_block_edit_form_builder() (Zeile 696 von /var/www/web537/html/kle/sites/all/modules/homebox/homebox.module).
Notice: Undefined property: stdClass::$key in homebox_block_edit_form_builder() (Zeile 698 von /var/www/web537/html/kle/sites/all/modules/homebox/homebox.module).
This problem can be fixed by this patch ?
Comment #31
brianV commentedClosing this issue.
@HJulien and milkmaruku :
Please create a separate issue for your problems.
@drufiz: That should be fixed in latest dev.
Comment #32
Michsk commentedJust updated from 6.2 to 6.3.beta5, this still shows the style attr is undefined.
And the DEV of 6.3 is even worse, full of errors.
Comment #33
brianV commentedPlease open a new ticket. This one is closed.
Comment #34
Michsk commentedBut it is the same issue...
Comment #35
brianV commentedThis ticket is cluttered with irrelevant posts, old fixes to old branches which don't work, and other cruft that makes this issue post useless.
Please open a new ticket.
Comment #36
HJulien commentedUnfortunately I'm not using Homebox anymore. I couldn't wait any longer.
Comment #37
LiuShaz commentedI just added additional condition "$(this).parent('.homebox-column-wrapper').attr('style')" and everything works for me.
Comment #38
rickmanelius commentedWhatever the history of this issue. The fix in #37 works for me.
Comment #39
HFT commentedFor reference, with a fresh install of 6.3 Beta5, the js was broken and setting the custom widths for the columns was all i needed to do to fix it.
Comment #40
mschudders commentedConfirms #37 resolves the problem.
Added the patch so we can add this to the next release.
Comment #41
vectoroc commentedI mean different patch