Good day

After update from 7.0 to 7.2, i got

Notice: unserialize() [function.unserialize]: Error at offset 65533 of 65535 bytes in views_db_object->load_row() (line 1857 в /mysite/sites/all/modules/views/includes/view.inc). Notice: unserialize() [function.unserialize]:

and

Error at offset 65501 of 65535 bytes в views_db_object->load_row() (line 1857 in /mysite/sites/all/modules/views/includes/view.inc).

What is it?
What can I do?

Comments

What is the result of 'describe views_view' and 'describe views_display' from mysql prompt?

Status:Active» Closed (won't fix)

65535 is a really interesting number, as that is the maximum number you get with a short int. That suggests that while your database is showing that you have a longtext it is not, in fact, storing a longtext and that -- somehow -- the serialized blob fields are getting cut off.

I don't know what we could possibly do about this. It may be a bug in DBTNG or in your database version or in your PDO version? I don't know where to begin to investigate that.

I don't think there's much we can do about it in Views. :(

Title:Function.unserialize Error at offset 65533 of 65535 bytesunserialize() [function.unserialize]: Error at offset 2642 of 3582 bytes in views_db_object->load_row() (row 2004
Version:7.x-3.0-beta3» 7.x-3.0-rc1

Hello,
the title appears when I go to structure->blocks

row 2004 is in my version of views.inc the second row of
'filter' => array(
'title' => t('Filter criteria'),
'ltitle' => t('filter criteria'),
'stitle' => t('Filter criterion'),
'lstitle' => t('filter criterion'),
'plural' => 'filters',
),

I had some problems with beta3 before and installed the last version of views(3.0-rc1). It did not solve my problems. But I lost during this upgrade the operators of my filter conditions. I was able to fix it. But I was still not happy, because I get tabs with 'view' and 'view items' even if the user is not loged in. And I get it also for simple articles. A further problem is that a view block in the main content region is not really recognized by the system and I still get the Welcome title and the information that no content was created. So I have to create at least one article for the main content region.
I decided to upgrade to drupal 7.4 because I had some trouble with wysiwyg too. I was not happier afterwards and decided to bring my system back to version 7.2. And now I get the above error message ....
Please do not tell me that I have to start again with an installation of drupal 7.4. I think that drupal 7 is not in the condition to start with it. Are you able to give as some information, when views will be in a stable state?

Hello,
I was able to reproduce this unserialize problem with a smaller SQL file in my local installation. When I split one of the rows containing the content of column display_options of table views_display inserting CR/LF in the PHP array data, I get this problem. So it was probably my failure using the wrong export format. But anyway. It would be very nice if you catch this exception in further versions and remove such characters. It is not easy to analyze the SQL file and like me not all people test the SQL export file with an import in a local installation before changing the original database.

Hello,
sorry. I have this problem also in a local system which was upgraded from 7.2 to 7.4 and from views beta3 to rc1. And there was definitively no database import.

I was having this same error. It seems to be related to the way the mysql db was exported and imported. Anyways, to fix the error (at least manually), here is how I did it:

I truncated these tables:

views_display
views_view

Then I exported and imported all my custom views manually.

I got the solution from here.

Yes it works, Thanks xamount.

Ata

Just want to add, I had this problem and xamount's solution also worked for me. :) So thanks!

ps. in my case the db import was problematic because the site was migrating to a rubbishy shared host with limited mysql access and config options :(

As for me, I moved all views to code and it resolved the unserialize issues.

Hi, How to make views to code, do you have a framework to share?
Thanks in advance, greetings, Martijn

I've got hundreds of views.. And i don't want at all to manually remove export/import them.
Please, someone, any other solution?

For other ways to solve the problem, see https://drupal.org/node/1432004. In addition, I was able to solve the problem by editing each of my Views one by one, making a trivial change (adding a space to the view description, e.g.), and saving the View. After each save, the error repeated, until I apparently got to the problem view. Once I saved that view, the error went away.

Issue summary:View changes

I got this error too.

There was a view that was created by a module.
I updated the module.
The associated view self-corrected.
I had to go back and save it.
Error went away