I use the E-Commerce Kickstart distribution. Almost always I get some error, every time I update and save any view.
Please could anybody tell me what is causing this error, or give me some suggestions?
I have encountered the same issue and thus far to resolve but I found this article.
so...i researched some more and found this solution. I added this line to bootstrap.inc
$data = preg_replace('!s:(\d+):"(.*?)";!e', "'s:'.strlen('$2').':\"$2\";'", $variable->value);
$variables[$variable->name] = unserialize($data);
in the variable_init function
I know this was answered long ago, but this is to help out future Googlers.
All unserialize errors result from bad data in the database. Data stored in a serialized format will look like this:
s:9:"my string";
In your case, the unserialize error is resulting from a view. If you have a database viewer/query program (i.e. phpmyadmin, dbForge Express, Navicat etc.) you can look at the views tables. You'll find that the only one containing serialized data is the views_display table; the display_options field contains serialized data. You can then execute a query such as the following:
SELECT vid, display_title, length(display_options)
FROM views_display
WHERE length(display_options)="11637"
This particular query should return one result with the view id. You have the option to delete the view or try to repair the data.
To repair the data copy the serialized data into a text editor that will tell you what column/character you are on. In your case, you would go to column/character 10301 (the first number in the error) and see if you can identify a mismatch (wrong datatype, incorrect length, incorrect syntax). Copy the corrected data back into the database.
Recently I faced the same problem. Solutions above didn't look very reliable to run on production.. Luckily I had a dev server where the view was working fine so I did the following:
Export the view:
Import the view:
The imported view code solved the issue for me and hope that works for you as well!