Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
7.x-3.0-rc1
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
11 Jun 2011 at 19:30 UTC
Updated:
28 Jan 2020 at 16:51 UTC
Jump to comment: Most recent
Comments
Comment #1
merlinofchaos commentedWhat is the result of 'describe views_view' and 'describe views_display' from mysql prompt?
Comment #2
Valeratal commentedhttp://awesomescreenshot.com/084epjcda (views_view') and http://awesomescreenshot.com/0d9epjn27
http://awesomescreenshot.com/0d2epjda2 (views_display) and http://awesomescreenshot.com/01cepjpe7
Comment #3
merlinofchaos commented65535 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. :(
Comment #4
Carol11 commentedHello,
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?
Comment #5
Carol11 commentedHello,
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.
Comment #6
Carol11 commentedHello,
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.
Comment #7
xamountI 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.
Comment #8
mustafa.ata commentedYes it works, Thanks xamount.
Ata
Comment #9
nicl commentedJust 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 :(
Comment #10
pasive commentedAs for me, I moved all views to code and it resolved the unserialize issues.
Comment #11
summit commentedHi, How to make views to code, do you have a framework to share?
Thanks in advance, greetings, Martijn
Comment #12
rootical commentedI've got hundreds of views.. And i don't want at all to manually remove export/import them.
Please, someone, any other solution?
Comment #13
memcinto commentedFor 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.
Comment #14
socialnicheguru commentedI 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
Comment #15
Aurochs commentedThanks - helped me - what i did is (i use adminer) i imported a back-up database just as doubling my original database and deleted the 2 tables inthe old database and imported them from the backup-database (i made backup some adys ago so i am lucky)
Comment #16
feddovdm commentedIndeed, find the view and save it (also update your view module can help).
Comment #17
megastruktur commentedIf you have dozens of views you don't have to remove them all, just need to find, where is the error.
This short MySQL script will show you the view, which is broken:
Just change the HEREISTHENUMBER to whatever is in your error (in our case 3582):
Error at offset 2642 of 3582 bytes.
Then you can copy display_options column value to you text editor, find the str 2642 (a place of error) and try to figure out, why serialization is broken (in my case there was a s:4:" ? " - we don't have 4 symbols here, so I changed it to s:4:"hell" and saved the table).
After that I was able to access view and (just in case) made a minor change and clicked Save :)
Comment #18
summit commentedGreat info Megastruktur!!!
Comment #19
millionleaves commentedHere's the SQL from #17 in full (it wouldn't run on my server as written in #17 with the table name abbreviations).
This solution gave me what I needed - identified a number of broken views. Editing and fixing them got rid of the error reported here.
Comment #20
sivaprasadc commentedThanks, @millionleaves. This helped to identify the broken views.