Closed (fixed)
Project:
Homebox - Individual user dashboards
Version:
6.x-2.x-dev
Component:
Miscellaneous
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
11 Nov 2009 at 10:47 UTC
Updated:
20 Feb 2011 at 02:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jchatard commentedHi rolfmeijer,
Well actually I don't know if I'm going to release a 7 release because of the core Dashboard module. I haven't look at it for now and don't know if it solves what homebox has to offer.
If you have more on this please let me know. And more than this I really am full of work now, and it's are find some 'coding free time'.
But I do know that porting Homebox to D7 could give some really nice features, and as I think of it, I do have good ideas about the big rewrite. And last point, what makes me doubt about a D7 release is discussions that were made about homebox when it was released. Anyway, the short answer is: don't know yet.
Jérémy
Comment #2
lpalgarvio commentedD7 core dashboards adds blocks, but doesn't support multiple dashboards or per user dashboards.
Comment #3
mstef commentedUpdating this to 2.x..
At the moment, I don't have plans for a D7 port (yet). That doesn't mean that I'm going to do it - I just can't say when. This module is still being actively developed and is (most likely) going to be used for the drupal.org redesign. That work must come first.
Comment #4
mstef commentedComment #5
mcfilms commentedHi Mike -- I got a look at the Drupal.org redesign and I think once everyone sees Homebox in action, they are going to want it for their sites. Have you given any more thoughts about a port to D7? Is the task seriously daunting or just daunting?
Comment #6
mstef commentedIt will most likely get done once all the API changes are in place for the 6.x branch.
Comment #7
lpalgarvio commentedi'm more a fan of Panels for a complex setup, or D7 core Dashboard / D6 Managesite for a simple setup, when building a admin dashboard.
when building a personal dashboard, i would rely on Panels Dashboard or Homebox when they mature enough.
i've written a big review of dashboard modules here:
http://groups.drupal.org/node/95039
feel free to provide input so i can update it. homebox was reviewed about 2 months ago.
Comment #8
mstef commentedWhy'd you call Homebox buggy?
Comment #9
lpalgarvio commentedthe last version (2 months ago) i used made all sorts of "special effects" when trying to drag boxes around, even when using the default theme, garland.
also at that time, i think couldn't add new boxes successfully
edit: i updated the wiki further to state that homebox might at this moment be fully functional and that the review for it is outdated.
i do not have the time at this point to review it and other modules in that comparison again.
Comment #10
mstef commentedThat was probably before a 2.0 release was made.
Comment #11
dontgoquietly commentedI am building a Drupal 7 version of homebox right now for a site that upgraded to Drupal 7 - but needed homebox and can't revert just for that one function. I would be glad to help in this process, my version is thus far highly hacked - though I'm learning quite a bit.
Comment #12
dropchew commentedsubscribe
Comment #13
cyberwolf commentedSubscribing.
Comment #14
coloryan commentedSubscribing
Comment #15
DeltaT commentedsubscribing
Comment #16
lolandese commentedSubscribe
Comment #17
Anticosti commentedSubscribing
Comment #18
didox commentedSubscribing
Comment #19
dgastudio commentedSubscribing
Comment #20
webchickSince this module is running on Drupal.org, Drupal.org can't upgrade to Drupal 7 until this module does.
Comment #21
mstef commentedSince the d.o. redesign team jumped onto Homebox, I've basically removed myself from it. I was responsible for the jump to the 2.x branch of homebox, but I really don't like what I see was done in the dev branch. So this, and I suppose the remaining issues, will have to be taken care of by one of them.
Comment #22
blup commentedI'm actually in the process of porting this module to D7. I'd say I'm about halfway through, but I was wondering whether I should stick as closely as possible to the module's code, or if I should go ahead and make the homeboxes into entities? If so, would you accept entity api module as a dependency, or would you rather have custom CRUD functions?
Comment #23
webchickHm! that's a fine question. I'm afraid I don't really know the answer. I guess I would say that for an initial D7 port, probably makes the most sense to do as straight a port as possible, and then make a 7.x-2.x branch that's "awesome entities craziness".
I'll ping Neil and ask him to look at this, too.
Thanks so much for helping with the port!!
Comment #24
blup commentedHere's what i've gotten so far. Everything works fine except for the drag/drop of blocks in the homebox page (using the dropdown works fine), and there's an error from _form_set_class() if i remember correctly (caused by the dropdowns). I spent a while trying to fix those, but given that they don't affect the main functionality, I'll leave it to you guys. Oh, and i forgot to port homebox_og... maybe i'll get to that later.
Comment #25
blup commentedSorry, forgot to change status.
Comment #26
webchickNICE!!!! Thanks a ton, blup!
Comment #27
dgastudio commentedthank u very much blup!
one question, why we need dependence to jquery ui module if it's already included in d7?
Fatal error: Call to undefined function jquery_ui_get_version() in /home/u3220/domains/u******/sites/all/modules/homebox/homebox.module on line 1463
and
Notice: Undefined variable: output in homebox_help() (line 196 of /home/u3220/domains/u******/sites/all/modules/homebox/homebox.module).
Comment #28
thekevinday commentedI believe hook_help() should only return something if there is something to return.
Current code:
Should something more like:
This will solve the warning/error message from #27 about the homebox_help().
Also, the og support produces this warning:
Warning: Invalid argument supplied for foreach() in homebox_og_group_settings_page() (line 133 of sites/all/modules/homebox/homebox_og/homebox_og.module).Update:
Drupal 7 has jquery version: Query 1.4.2 and jQuery UI 1.8
As explained here: http://drupal.org/node/287304
The code that produces the error mentioned in #27 about "Call to undefined function jquery_ui_get_version() .." happens to be doing a dependency check for version 1.6.
For homebox to be supported in drupal 7, this must support version jquery ui 1.8 and so this segment of code should be removed.
I will make a patch once I resolve a bunch of other problems that have appeared.
Comment #29
thekevinday commentedHere is a patch against the code supplied from #24.
There were a number of problems solved in addition to those I mentioned in #28.
Numerous db_query calls were pulling data from the database with the wrong function.
Many cases didn't include the ->fetchAll() or ->fetchObject() and some others used ->fetchField() when ->fetchObject() should be true.
A few menu hook entries were incomplete.
The homebox_load() was being passed a string and not an array.
I rewrote the homebox_load() function to handle both a single string and an array of strings.
The homebox_load() was not even returning its results, so it was doing nothing.
I am using a patch so that you can more easily review changes and point out any mistakes or better solutions.
I still get a few error messages on the layout settings page:
Comment #30
sammyman commentedI am subscribing to this great module. thanks!
Comment #31
Ranjitsingh commentedHello all,
I'm new to drupal,actually introduced to it this week. I was looking for the igoogle type interface and came across this homebox. My unfortunate dilemma is that being a new user I went straight to D7. From reading the above it seems that user thekevinday has somewhat created a patch to update the homebox for D6?
Comment #32
lolandese commentedHi Ranjitsingh,
First of all welcome. Some advice. Set up your site with D7 like you want it to be, for now without the homebox functionality. By the time you're ready, Homebox will probably be available for D7 (it has an active issue cue). Choosing your modules now (especially now) for D7, you actually pick those that are actively maintained, so stick with D7. You jumped into Drupal at the right moment. Get to know Drupal and some mainstream modules (look at the Reported installs), like Views and Panels. Choose a solid but flexible theme like Fusion or one of it's sub-themes. There are lot's of articles available to get started.
Sorry to be a bit Off Topic. Good luck and be persistent. It takes a bit of time but it definitely pays off.
Comment #33
blup commentedThanks a lot for your help thekevinday, i guess i missed some details. Here's an updated version with the patch in #29. I'll try and take a look at homebox_og this week.
Comment #34
blup commentedSorry, I had made a mistake with the previous module files (older version). Here's the more recent version revised with patch from #29.
Comment #35
blup commentedAnd once more (small discrepancy between patch and revised version).
Comment #36
yareckon commentedsubscribing.
Comment #37
thekevinday commented#35 works much better, thanks.
However, another problem turned up.
There are a few cases where you have something like:
<?php $block->closable = ($block_settings['closable'] === 0) ? FALSE : TRUE; ?>It seems that this generates a warning on the screen.
To prevent the warning, such cases need to be wrapped in an isset() or similar check.
Example, the above code should look like:
<?php $block->closable = (isset($block_settings['closable']) && $block_settings['closable'] === 0) ? FALSE : TRUE; ?>I have another patch attached that fixes the cases like the one above where I noticed them.
Comment #38
thekevinday commentedI seem to have come across a few more problems.
This new patch includes & replaces the patch from #37.
There were a number of problems where warnings were printed to the screen because of elements of an array being directly access without confirming that the variable is an array.
There are a few cases were the CSS class attribute is being altered and passed to the theme engine as a string.
It seems that the theme engine expects the #attributes class element to be an array of strings and not a string itself.
In particular, on line #641 of homebox.admin.inc, there seems to be a custom block_listing row_class variable.
I am assuming/guessing that this needed to be converted to an array, given that one of its options directly accesses the #attributes class element. Someone who knows this project better than me needs to review this change to ensure that it is a correct change.
There is also a database problem with the OG integration module.
I do not have a solution for this and do not know if the problem is with homebox, if the problem is with the views module or if the problem is with og itself.
When viewing a home box page with the og_members: block on it I get the following message:
Thats all I have for now.
Comment #39
Seraphin42 commentedSubscribing.
Comment #40
jurgenhaasThis is great effort which will benefit a lot of pages, I'm sure. Just wondering why the code is posted as attachments instead of being posted to the CVS?
Comment #41
thekevinday commentedTo answer #40:
The submitters of the attachments are the community and not the developers.
We cannot access the CVS for whatever reason be it no write access or it is against the drupal code of conduct to alter a project in which you are not in the projects developer list.
Therefore the attachments have to be made available via this method.
Comment #42
Ranjitsingh commentedThanks lolandese.
I'm working on my thesis. It's actually a portal to test usability. I wanted to have about three portals on the main page available so the users could easily navigate to the one they like the most. Not sure if anyone can advise me as to how I can achieve this at the moment as homebox isn't just yet ready.
kind regards,
Ranjitsingh.
Comment #43
OnkelTem commentedSubscribing
Comment #44
Anonymous (not verified) commentedSubscribing
Comment #45
timofey commentedSubscribing
Comment #46
kalebheitzman commentedSubscribing
Comment #47
berdirI suggest you post a a single patch from 6.x to 7.x, it's impossible to keep track of all these archives and incremental patches :)
Or alternatively, what I'm usually doing for bigger projects, clone the git repository (git clone git://git.drupalcode.org/project/homebox.git), then you can make local commits to a separate branch push your code to github.com or a similiar project. github for example then automatically provides a download link where users interested in testing can download a single archive but you can continue to do incremental patches. Another advantage is that you can more easily merge changes from the official repository.
Comment #48
JohnnyX commentedI think a release here at drupal.org would be great.
Subscribe
Comment #49
thekevinday commentedThe "incremental patch" is a single patch by itself. Do not attempt to apply -1, -2, and -3, just use the most recent
That number represents a version number, not a patching order.
That aside, I am glad drupal git is progressing.
I will at some point bring up one of my own servers and provide sub-branches.
(But only as soon as I learn how to setup a git server)
Back to this project, it looks like I have come across another bug:
Notice: Undefined offset: 1 in _homebox_check_views_block_access() (line 1015 of homebox/homebox.module).I am not sure what is happening here to cause this.
Comment #50
berdirYes, but it is a patch that is applied to a uploaded archive if I understood it correctly :)
A single 6.x -> 7.x patch shows the actual differences and can be reviewed with tools like dreditor.
Comment #51
blup commentedI made a repository with the changes so far. Feel free to branch it with any other patches. https://github.com/blup/homebox
Comment #52
dgastudio commentedafter install last github version:
Comment #53
brianV commentedBerdir:
Please find a patch attached between 6.x-2.x and the D7 port in blup's github.
Probably this is where the review can start in earnest!
Edit: It looks like this port started with a copy of the Dev tarball as of Aug. 11 / 2010. I suspect that it likely reverts several month's worth of patches.
I think I will need to diff blup's D7 repo against an Aug. 11 version of the repository to just get the d7 changes, then see if I can work them forward to be against the present 6.x-2.x branch...
Comment #54
brianV commentedOk, I forward-ported the previous patch against current 6.x-2.x. It should now apply cleanly. However, it will still need work as obviously, it only touches code that existed in August.
Comment #55
berdirThat's quite a patch. :) Even though it's 100kb less then the other one.
Since I promised it, I'll give it a look.
- The fetchAll() is not necessary, foreach() can directly loop over a result set.
- I'm wondering if this could use user_roles() instead? A possible advantage would be that that function adds the translatable tag which could eventually display translated role names then.
Not sure if this shouldn't be !empty() instead of isset(). Aka, could this be an an empty string, FALSE or something like that?
This could use module_load_include, I guess?
There is a nifty little function called drupal_map_assoc() which can convert from array(1,2,3,4) to array(1 => 1, 2 => 2, and so on.
- The whole information added ... stuff can be completely removed, no idea where this is coming from, probably started porting on a downloaded release archive?
- Also, files[] declarations are only necessary for files which contain classes.
Since all of the others are removed, here is a new trailing space added by this patch :)
title should be improved (at least Administer..). description could probably simply be removed, this is kinda obvious :)
Better nothing than a TODO string imho.
No idea what that commented out part is about?
render element is not an element, the second one is correct.
Another new trailing whitespace.
Same here, fetchAll() isn't necessary.
The chained calls should be indented by 2 spaces.
Kinda weird syntax, never seen anything in core actually checking the return value of delete queries like this.
If this exists for a reason (perfectly possible), then those calls should imho be done outside of the if to make it easier to read. This would actually make the if unecessary, it could simply be "return $deleted_pages && $deleted_users;".
Again, fetchAll()... :)
same as above. Or something like "return (bool) db_delete)(..."
And thinking about it, I don't think this code made any sense... this will always return a resource which equals TRUE, even if nothing has been deleted. So it can probably just be deleted :)
This seems to check if we are using at least PHP 5.2. Since this is a core requirement now, this can be removed. Maybe the whole hook_requirements part could be removed since the jquery ui check is removed too..?
Same as above, this can be removed now.
Another one.
Kinda weird that it stops at this point, I guess the port of this module isn't finished.
I'm also quite sure that there were api changes in og.module and this hasn't been tested yet :)
Powered by Dreditor.
Comment #56
thekevinday commentedThere are actually a significant number of problems.
1)
in all cases, the
require_once DRUPAL_ROOT . '/' ...code should be removed as it is handled already byfiles[] = ...in the .info files.2)
in template_preprocess_homebox_admin_display_form() from homebox.admin.inc:
- All cases of
['#attributes']['class']should be an array of strings and not a string itself.3)
in template_preprocess_homebox_admin_display_form() from homebox.admin.inc:
- drupal_render_children() should be used instead of drupal_render():
- I am not entirely clear as to why this is, but without this change things don't work.
4)
in homebox_configure_form() from homebox.admin.inc:
- All cases of
$page->settings['colors'][$i] ? $page->settings['colors'][$i] ...should be wrapped in isset() like:5)
in homebox_named_columns() from homebox.admin.inc:
- the produced columns array should be returned and not some custom array, thus:
6)
in the template file homebox/homebox-block.tpl.php:
- should
print $block->content;be wrapped by drupal_render() ?7)
in homebox_theme() from homebox.module:
- A correction from comment #55:
8)
in template_preprocess_homebox() from homebox.module:
- I don't understand the logic for doing something like the following:
drupal_add_js($data = drupal_get_path('module', 'homebox') ...- why is $data being assigned inline with the drupal_get_path()?
- $data does not even seem to be used, so removing this makes sense
- also, for performance reasons, only make one call to drupal_get_path() and store it in a variable
9)
in homebox_build() from homebox.module:
- There is a comment referencing how to properly implement parts of this function, so why not just implement it?
- This includes adding an implementation of hook_page_alter()
10)
in homebox_load_blocks_in_regions() from homebox.module:
- I believe it is better to properly check the existence of an array key before acting on it, example:
11)
in homebox_load_blocks_in_regions() from homebox.module:
- for some reason the invoking of the block was changed in recent patches, this change does not work in any of my cases.
- I had to do the following:
- why is this? I need to confirm how these functions work and how to make it work properly in all cases.
12)
in homebox_load_blocks_in_regions() from homebox.module:
- The variable $can_access_view does not exists and yet it is being called
13)
in homebox_load_blocks_in_regions() from homebox.module:
- the db_query() takes $block->bid, it is safer to check that $block->bid exists before doing this call
14)
in _homebox_get_css_classes_for_blockfrom homebox.module:
- Again, checking the existence of array keys is safer than just directly accessing
There are more problems than just these, but this is as far as I have gotten thus far.
A few of these problems I am uncertain on whether my solution is a proper fix or not, but it does appear to solve the problem.
I have a version from my patched version and a version from the latest patches.
My patched version works (but also includes some of the above 14 issues) whereas the more recent patches do not work without the above changes and mostly works with the above 14 changes.
I have attached a patch that contains all of my changes mentioned here so you can see for yourself.
They are expected to be applied after the patch from #54 because it is meant to fix problems from the #54
patch.
Comment #57
brianV commentedKevinDay - thanks for the improvements.
I had done a chunk of work on the module since the version I posted in #54 on on the 28th. I've merged your improvements with mine in the below patch, which also deals with all of Berdir's suggestions on the
#54. The biggest departure from what you wrote in #55 is the first point - I removed all the
files[]lines from the .info files (since they are intended for class autoloading), and replaces therequire_oncecall with amodule_load_include().I think the attached accurately represents the combined state of your progress and mine.
Comment #58
georgedamonkey commentedsubscribe
Comment #59
bazzly commentedCan someone tell me how to use this? I'm trying to set it up but it wants to Import data....Sorry I posted this here but couldn't find any info on setup.
Comment #60
dgastudio commentedif u don't know how to use it, my advice, wait for oficial release.
Comment #61
georgedamonkey commentedI've tried loading the patch against a download of version 6.x-2.x, and when I view the modules page, it shows it's for 6.x-2.x-dev. Is there anything else I need to do to get it to work?
Comment #62
brianV commentedModule isn't usable yet on a production site, so don't bother trying. Needs a lot of fixing before it will work in any fashion.
Comment #63
thekevinday commentedThe patch is improving, but there are still more problems to fix.
1)
In homebox.tpl.php, change
<?php print theme('homebox_block', $block, $page); ?>to
<?php print theme('homebox_block', array('block' => $block, 'page' => $page)); ?>The theme function requires the second parameter to be an array of parameters.
Otherwise there is a whitescreen PHP error about treating an object as an array.
2)
In homebox.module, the function homebox_pre_build_user() has the $available_blocks variable, but I don't see one defined. Perhaps it should be changed to the $allowed_blocks variable?
3)
In homebox.module, the function homebox_prepare_block() around line #621:
<?php if (isset($block->content) && trim($block->content)) { ?>I am getting an array for $block->content and so trim() is generating warnings.
It seems that I overlooked this issue as I had to already perform a drupal_render($block->content) in the theme template.
Further study suggests that I might be able to move the drupal_render() from the homebox-block.tpl.php to this area of code such that I have:
I obviously need a better understanding on how $block->content is being populated before making a decision on how to handle this. (please advise)
4)
The following
Notice: Undefined index: auto_save in template_preprocess_homebox() (line 305 of ...can be silenced with a change in homebox.tpl.php of:
<?php print $save_form; ?>to
<?php if (isset($save_form)) print $save_form; ?>But the real question is why is it not defined?
5)
In homebox.module, the function homebox_save_form():
$page->namedoes not seem to exist.I can find the node name at:
$page['build_info']['args']['0'];but I doubt that is the correct thing to do.
6)
The blocks are now appearing again, but javascript drag and drop is not working at this time.
None of the homebox block buttons seem to do anything as well.
Perhaps one of the changes I did broke it?
EDIT:
7)
There also seem to be a large number of places where check_plain(), check_markup(), or some function that calls those needs to be called (or not).
It seems I have added it to a spot where it is unnecessary:
I get the following block:
Who's newbecause of:
<?php $variables['block_listing'][$region][$i]->block_title = check_plain($block['info']['#value']);?>Removing the
check_plain()in this case producesWho's new.In this case should
t()be used instead?drupal_render()does not work in this case.Comment #64
brianV commentedHi Kevin:
I've caught and addressed most of those (apart form JS not working on the drag and drop) in the following patch, along with a pile more fixes.
It's too bad you aren't on IRC. I am working on this throughout the day, and I think you are putting lots of time catching bugs I have already fixed...
Brian
Comment #65
brianV commentedAttached please find my most recent (for now) update to this patch, along with a tarball copy of the module.
At this point, everything is pretty much working with two exceptions:
1. Autosaving of the block positions when changed - JS issue somewhere.
2. Regular saving of block positions is temperamental. I would say it doesn't work at all except in rare cases when it does.
I think #1 is in homebox.js; I haven't had much luck tracking it down. #2 should be something easier; as far as I can tell, it's in this block of code:
The drupal_write_record() call at the end throws a SQL error telling me that I am trying to insert a duplicate row for my users UID. In short, it looks like the db_delete() above isn't actually working for some reason.
I am going to leave this as is for now. Hopefully someone else can step in and fix the above two issues.
Comment #66
berdirWhat is the exact error message?
The code looks fine for me.
Comment #67
georgedamonkey commentedThank you!!
I'm not sure if this is related to what you mentioned, but I did notice that if I'm logged in as an authenticated user and I try to add a block to the page, it doesn't actually get added. Clicking on 'add a block' shows the blocks I've made available. But, when I click on any of them, it just refreshes the page and doesn't actually get added. No errors or anything, the blocks just don't appear anywhere.
Comment #68
JohnnyX commentedI found user_dashboard as a alternative module but it doesn't work (install failed with sql error). Could somebody show the pros and cons between homebox and user_dashboard?
Comment #69
brianV commented@georgedamonkey:
As I said above, saving blocks from the user-facing portion is not working in the above tarball.
@JohnnyX:
Please open a support ticket for that. Your question is off-topic for this issue.
@Berdir:
I have the manual block position saving working now in my local code. It's just autosave left. I don't have much to follow up on that one. The save form button doesn't hide like it should, and it's not triggered when blocks are moved.
Comment #70
brianV commentedNew version of the patch, more bugs fixed.
I've contacted drumm to see about getting a 7.x development branch opened and / or CVS access on this project. I get the impression it's somewhat abandoned as mikesteff has not been active in it since it was taken over for the drupal.org redesign, and the redesign people have accomplished what they want with it...
Comment #71
georgedamonkey commentedThank you so much for taking the time with this.
I seem to have issues with patch... Could you please attach a tar of the patched module for us?
Thanks again!
Comment #72
brianV commented@georgedamonkey:
I was just granted CVS access by jchatard, the original maintainer of this module. I'll be putting the module into CVS shortly. Once that is done, you'll be able to grab the module from CVS.
However, first I think I might commit a whitespace fix against 6.x-2.x. This will shrink the size of the current patch above by a very large margin, in turn shrinking the initial 7.x-2.x changes.
Once that is done, I will likely close this issue, so that specific issues can be created against a 7.x branch to address specific problems.
Comment #73
brianV commentedok, attached is the final patch of the 6.x-2.x branch which I will use to create the D7 branch. As mentioned above, I committed a bunch of whitespace fixed to 6.x-2.x, then re-diffed my local 7.x branch. This results in a much, much more focused patch which would be in turn much, much easier to work with.
Comment #74
brianV commentedA 7.x-2.x branch has been created in CVS, and a dev release node has been created (although it won't appear until -dev tarballs are updated overnight).
I am setting this issue as 'fixed' for now; please file any further bugs / changes required in their own issues against version 7.x-2.x-dev.
Comment #75
webchickWow, great work on this folks!! :D
Comment #76
brianV commentedDon't be too quick with the accolades - there's some major bugs still in this port. But I a really hoping that having a -dev release out, and code easily available through CVS will make it a little easier for others to help grind through the remaining problems. Or at least find new ones I haven't encountered yet.
Comment #77
blup commentedI find it a bit unfair that I worked on this port for several days, if not a week, and I was refused CVS access to open a dev branch. brianV then posted a couple of patches and he gets to make the commits...
Comment #78
brianV commentedblup:
If I've stepped on toes, it wasn't intentional. My only goal was to try to get a working D7 homebox port going, since the company I work for (PINGV Creative) needs it for a client project we are working on. As it is, the D7 version committed still has some major warts / critical issues.
I'd love your help polishing the D7 branch into a product that can be released.