Continuously get message ->The structure was broken. It has been repaired.
Straddle - March 6, 2009 - 21:59
| Project: | DraggableViews |
| Version: | 6.x-3.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Description
I always get this message at the top when my draggable table renders. How do I avoid this please?

#1
argh. retarded. This always occurs if a sort method is not defined in the view itself. My own fault.
closed.
#2
Im not sure your right about that. I had a sort method and was still getting errors.
The only thing that got rid of that displaying on top of my view was to uncheck....
"Override normal sorting if click sorting is used" In the draggable views configuration.
I found this by accident, just unchecked it because I was not using click sorting any longer.
-------
That said I could be wrong too .. but im changing this to active and a bug just in case.
If I am wrong please forgive me... and re-close this! lol
#3
I have trouble with this too.
#4
I have "Draggableviews: Value #1" set as my sort order and have unchecked "Override normal sorting if click sorting is used" but still get the "The structure was broken. It has been repaired." message. It appears for anonymous users as well. The only way I found to remove the message is to make this message blank in the main Draggable views configuration under "Site Configuration." THis solved the symptom, but the underlying bug still needs to be addressed so please leave this issue open.
#5
I have "Draggableviews: Value #1" set as my sort order and have unchecked "Override normal sorting if click sorting is used" but still get the "The structure was broken. It has been repaired." message. It appears for anonymous users as well. The only way I found to remove the message is to make this message blank in the main Draggable views configuration under "Site Configuration." THis solved the symptom, but the underlying bug still needs to be addressed so please leave this issue open.
#6
Me too. I'm using it with Flag Weights.
"The structure was broken. It has been repaired." shows up once whtn the page is loaded and shows up twice when you click "save". It doesn't save the order when "save" is clicked either.
#7
First disable paging (set items per page=0) to make sure this doesn't cause the problems.
If this doesn't help check if you have permissions to write the CCK/weight fields.
#8
#9
I am having the same problem. Plus lacking any documentation makes this module useless for now :(
- "Override normal sorting if click sorting is used" is off
- Order field is set to "Weight" CCK field, handler CCK
- Sorting by CCK field Weight, ascending
- Pager is off, display unlimited number of nodes
Here is the view export: http://www.pastebin.cz/c076e0f8d4f4c6
#10
Now I managed to reproduce this bug. It occurs when you add CCK fields to node-types afterwards.
Because of this there aren't any records for these nodes in the CCK database tables.
Until now the CCK handler didn't save a value if the order field is missing. The attached patch makes the CCK handler write into the order field anyway, even if there isn't such a field specified for the node.
Hope this helps!
Greetings,
sevi
#11
#12
Anyone out there who tried the patch?
#13
after patch:
Fatal error: Cannot access empty property in modules/draggableviews/modules/draggableviews_cck/draggableviews_handler_cck.inc
$field = &$node->{$this->real_field_name};
So I rolled it back, droped cck weight and reconfigured Style: Draggable Table to support Native handler. Error gone and I 've got my sorting.
#14
for CCK handler: http://drupal.org/node/283498#comment-1608794
#15
Now it's working with or without the patch?
#16
one way i found to fix this was to install Views Bulk Operations and modify the cck order field that you are using to sort on. I just changed them all to "0" and refreshed the draggable table view a couple times to get the error to go away. not sure yet if this will hold and it will reset whatever order you may have had prior. luckily i only need to resort 20 or so in the list. this was caused by me adding the cck order field after the nodes had been created. i prefer the cck field because i may want to filter on it. not sure if it makes sense for Draggable Views to expose the native sort and parent fields as filters.
i did not try the patch in #10
r,
coby
#17
I was having the same issue with flag weights.
What seemed to finally work for me was to click on the settings for draggable table, and check "sortable" for weight, and set it as default. Not sure if that will work in other cases, but I thought I'd post in case that's anyone else's issue as well.
#18
I too was having this problem when trying to use DraggableViews to manage the list of Frequently Asked Questions on my site. I was able to fix it by manually editing the FAQ nodes I had already created and inserting values in my Order field.
To minimize the appearance of the broken structure warning in the future, and to ensure new FAQs go to the bottom of the list, I entered the following into the php box for calculating the default value of my Order field.
<?php$result = db_query('SELECT field_order_value from content_type_faq ORDER BY field_order_value DESC;');
$next = db_result($result)+1;
return array(0 => array('value' => $next));
?>
Now all new FAQ nodes are guarantied to have the highest value in field_order when first submitted. If anyone has a better solution I'd be happy to hear it.
#19
The "Behaviour of new nodes" can be changed in the style plugin settings. Click "On Bottom" to let them appear at the bottom by default. To use this feature the function is_integer($value) must return FALSE. So try to use "bla" or any other non-integer as the default value.
This is the preferred way and it should work.
Are you working with the latest dev-version? With this version the message "The structure was broken. It has been repaired." should only appear once at all. Otherwise I would have to fix this a little more :)
Greetings,
sevi
#20
This patch should do it.
#21
I get this message also when using with flag_weights. I'm not using draggable_views_cck, so the patch doesn't help.
#22
additionally, the flag weights are not saved when pressing the 'save' button. attached is an export of the view:
#23
the flag had existed prior to enabling the flag weights module, if that helps.
#24
and yes, creating a new test flag and setting that to the view seems to solve that problem. doesn't help w/ the issue of current flags, of course.
#25
i take it back -- once you have flagged content with the new flag, you still get the warnings.
#26
The exported views code tells me that you use "Native" Handler instead of "Flag Weights" handler for the order field.
Currently all changes are written to the wrong database table :)
#27
So how do I fix this error?
#28
You're using flag_weights, right?
I guess the only thing you have to do is changing the handler from "Native" to "Flag Weights".
Doesn't this work?
#29
Had to re-create the fields in the view.
Old: Draggableviews: Order Value #1
New: DraggableViews: Order Order
Then set it in the Style: settings
#30
Now it is fixed?
#31
yeah after manually changing things around, its fix. The upgrade process wasn't smooth, thats the bug in short.
#32
There's a prompt at the project page.
Updating views data and views settings is a little bit complicated.
I'll call this issue "closed".
#33
I still get this error on the dev version, even when I have followed the instructions in this issue.
I did upgrade from beta, but I have created new views since then, which still have the bug.
#34
Is it possible to post the views export codes here? (at least the $view->override_option("style") part)