I took a stab at this problem. It appears that you are checking if a refresh is required using an if statement and then running the rebuild function and telling the user to refresh the page. Instead, I simply changed the if statements to a single while to continually loop through the rebuild function until a clean structure is available. The other changes I made included in this patch include removing the errors and status messages associated with this problem as they are no longer necessary, and a few minor positioning and code standards issues.
Note, there are still quite a few coding standard issues with this module which makes working on it quite difficult. Also, HEAD appears to be broken as well (unresolved conflict as well as quite a few inconsistencies with the 3.1 branch) so this patch is to the 3.1 branch. If you would not mind taking care of at least the latter and cleaning up CVS a bit, I will be more than willing to keep submitting patches as I come across things that need altered.
I really appreciate the work you have put into this module. It is a great idea and has a lot of potential.
| Comment | File | Size | Author |
|---|---|---|---|
| draggableviews_refresh.patch | 7.14 KB | ultimateboy |
Comments
Comment #1
junro commentedSubscribe!
"It is a great idea and has a lot of potential." Sure! But the maintenor doesn't see that or didn't have time to work on its fabulous module... maybe he has to find a co-maintenor working with him..
Comment #2
crizYes, Sevi has not much time at the moment, but this module will remain maintained. Please be patient. If someone is willing to co-maintain, just contact me or Sevi, it would be appreciated!
And I think this patch would make sense, I will test it and report back.
Comment #3
junro commentedOk, maybe you should post an issue to looking for someone to co-maintain this module. It should be a very hudge module with at least 2 3 guys working on it. I think a lost of developpers into the Drupal community would like to work on it so this module is interesting...
Comment #4
sevi commentedHi,
first of all thanks for all your work and time you've spent these issues. It really appreciate this. I'm sorry for not-maintaining this module the last months. Now I'm willing to make draggableviews a stable module and - over all - more open for other developers.
I agree with you: This is an important issue to make draggableviews usable on productive sites. But in addition I should think about how collisions occur and how to control them a bit more.
@ultimateboy: Thanks for the patch.
concerning coding standards: I really took care of fitting the standards. OK, the SQL statements were ugly. For my defence: The code with the tabs in stead of spaces you prepared was not in use until now. Yes I know, this shouldn't be there:\
concerning if-while: I've not tested it yet, but currently I can't believe that this works. First of all _draggableviews_rebuild_hierarchy($info) should eliminate all conflicts with the first run (assumed it operates bug-free).
Moreover there is the fact that after a rebuild the view has to be loaded for a new, because the nodes probably changed order.
I'll continue your work and add all the required stuff.
Comment #5
sevi commentedThe new code uses recursion to fix broken structures and it seems to work ('til now ;)).
Since the code has changed very much I'll close this issue. Any bug reports concerning building/rebuilding structure should start a new issue.