Viewfields reset to none after updating
Junro - March 28, 2009 - 21:44
| Project: | Viewfield |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
Hello, all my viewfields are reset to none, I don't know when it happened... It's very frustrating lol. How could to have my settings back? I've got more than 500 nodes affected...

#1
Sorry, How could I have my settings back? I've got more than 500 nodes affected..
ps: only nodes created before February 12th are affected.
I really need to find a way to put back all my original settings.
#2
I just updated my to 6.x-1.x-dev (2009-Mar-27) and saw all the viewfield-fields were not displaying. I decided to place back the old (dev-version) viewfield module and it worked again. It's a good thing I always first back-up the whole site (and database) before updating modules...
#3
Yes you're right, place back the old (dev-version) viewfield module works.
It's not the first time it's happen.
#4
I find this curious as I tested this against multiple sites with different viewfield configurations and did not have any issues such as this. I'm wondering which version you're currently using. Can you post a tarball of the copy you're using on your site currently?
Jer
#5
#6
+1 to this. It happened the same thing to me.
I´ve used the last dev 6.x version. Now it only appears the last one the one updated to march 27.
But the older one (one that isn´t appearing in the releases list) worked ok.
#7
Can you provide the requested information? I need to confirm the code you're using which works to verify what the problem might be. I have a good guess, and I'm working to account for it right now.
Jer
#8
This is what I´ve been using. (Attached). Thanks for your help!
#9
Hello;
As we can update a dev. version, I update it.
So I update the new dev. version from the old dev. version.
For me it was default view display who was missing.
cck viewfield settings:
number of values: 5
hum tarball I don't really know what is it but I think it's the viewfield.info.
; Information added by drupal.org packaging script on 2009-03-10
version = "6.x-1.x-dev"
core = "6.x"
project = "viewfield"
datestamp = "1236644597"
This is the version before the latest dev. version (I'm quite sure).
#10
That's helpful, thanks for the info.
What versions of Drupal Core and CCK are you using on this site? Can you take some screenshots of your viewfield configuration on both the content type and node level?
Thanks!
Jer
#11
Drupal 6.3 (I know I should update the last version)
Content Construction Kit (CCK) 6.x-2.x-dev (2009-mars-27)
#12
I´m using Drupal 6.10, and same CCK version as Junro.
#13
More details about the problem:
- When you enter an override default option in the definition and select OVERRIDE DEFAULT in the submitting form, it does not work.
- When you do not enter an override deafult in definition, the default value is set to 'none' in the creation time and re-reset to 'none' when you edit the node (no matter how view was selected). The arguments are respected.
Probably it is a problem in the way default values are treated. It seems that the default value override the current value. When you edit a node all is reset to something unpredictable. But the viewfields with force default works fine.
For me is a big problem because I have a lot of nodes which works with the older versions .
I am using the last version (27-3)
I re-installed 2009-feb-20 version and after deactivating and re-activating the module thinghs works as expected, i.e.:
- OVERRIDEN fields maintain the overriding view
- NOT overrrided fields maintain the default view.
More information: 2009-mar-2 version respected the selected view but changed it when editing, i.e. you have to manually change the view each time the node was edited. The override default option did not work at all (i had to deactivate it)
I hope this information will be useful.
#14
My site runs Drupal 6.10; CCK 6.x-2.2; Viewfield 6.x-1.x-dev (03/27). Fields configured as shown in the two attached screenshots are no more output. Those fields use forced default values. I have to mention, that, unlike for the 5.x viewfield version, I was obliged to check the "Use a common default value ..." during the port of my site from D5 to D6, in order to have the "forced default value" option working correctly. I hope that will help ....
Thanks for your work.
Regards.
#15
Not sure if this is related to this issue, if it is not, please let me know and I'll submit another one.
I have a content type named "Page with view" and had the same problem with "disappearing" views from viewfields. After re-entering them manually I realized that most nodes have their views back but some of them still have them set as "none" and this cannot be changed (edit a node -> select a view for the viewfield -> save the node -> no view is displayed -> edit the node again -> viewfield is set to "none" -> unable to do anything with it).
I realized that the problem lies in the content_type_page_with_view table. The field_view_vname column in this table can hold a varchar(32), which is the maximum allowed length of a view identifier. But this column contains not just the view identifier but also an appended "|default" string (at least in my case). So, if the view identifier is longer than 24 characters, the total length of the string is higher than 32 and the string is truncated (only e.g. "trips_in_the_czech_republic|defa") is saved into the table.
By extending the column to hold a varchar(48) I was able to temporarily solve the problem on my site (dirty and nasty hack, I know).
Hope this is somehow helpful...
#16
For now, I´ve changed up my version from latest dev, and replaced it from the oldest one posted in #8, which seems to work. (It works for me at least :).
#17
These are the known cases for disappearing viewfield views:
The last 2 issues have not been fixed yet. The field length issue is straight forward and will be fixed shortly. The last issue is a bit trickier. In the 02/10/09 snapshot I added support to select individual displays in Views 2. This meant that you could drill into your view and pick a specific display rather than having to create a new default display for each viewfield. When this was implemented, an upgrade path was not added. Up until the 3/27 snapshot, the default display was generally still used - so the issue went somewhat un-noticed. With the changes in 3/27 that corrected the first 3 issues listed above, this behavior went away and all old viewfields that hand not been updated to select a display stopped working.
In the next snapshot of Viewfield I'll add the upgrade hook which will go back and select the default display for existing viewfields if a display is not already selected. This will require a run of update.php to execute.
If anyone has found any other issues with vanishing views that I have not listed above, please let me know so I can investigate further.
Thanks!
Jer
#18
Fixed in CVS commit 193572. The fix will be applied when you run update.php.
#19
Fixed with Viewfield 6.x-1.x-dev (2009-avr.-08) ?
The new dev version doesn't fix the problem for me.
#20
Did you run update.php?
#21
I did...
But I try again and it's working now.
I think it's with the new recommended version of Views (2.5) that it's still don't work.
I've got lot of problems with Views 2.5, I have to put back the 2.3 version.
last minnute: I didn't check my nodes created before February 12th (see next post below).
#22
#23
Hum no, the problem still exist.
All nodes created before February 12th are affected. Stil the same problem.
And now, I can't put back my old version.
I've gott this:
Fatal error: Cannot redeclare theme_viewfield_formatter() (previously declared in /home/pariscin/www/sites/all/modules/viewfield/viewfield.module:185) in /home/pariscin/www/sites/all/modules/viewfield/theme/viewfield.theme.inc on line 25
But I run again update.php with my old version, and yess! my viewfields are back!
Funny because running update.php don't change anything in my tables...
So, BUG NOT FIXE, sorry.... :)
#24
A similar problem was encountered on a Drupal site I maintain after upgrading to Views 2.5, i.e. viewfields on existing nodes were no longer displayed in the node output.
I found that editing the node (not actually making any changes) and saving it would fix the problem. This proved to be a feasible solution on this particular site as there were only a small number of nodes with viewfields.
In hindsight, perhaps this would have been remedied by clearing Drupal's cache tables...?
#25
I tried clearing the cache from the Performance section and it didn't work. I also tried the editing and saving method but the viewfields still don't show up. This is all with the latest dev version of viewfield, the latest stable version of Views (2.5) and the latest stable CCK (2.2).
*edit* nearly forgot: Drupal version 6.11, although 6.10 had the same problem...
#26
Duplicate issue 460900.
#27
The cause of this issue is that for Views 1 we used the display format to choose a Views display style plugin. In Views 2, some of those plugins no longer exist, so there is no matching display format. As a result, the viewfield is not displayed.
We now use the view selection list to choose the display. I will write an update to map the old display formats to displays. In the mean time, saving both field settings and the display settings for your content type should cause it to display, unless you are experiencing the problem described in issue 434920.
#28
#29
Fixed in CVS commit 215694.
#30
Automatically closed -- issue fixed for 2 weeks with no activity.
#31
I can confirm that the latest dev verson works without a problem for me. No more views disappearing...
#32
I can confirm it doesn't work. Actually, the other time it happened I was able to restore it by bulk saving nodes. Now I've done all that and the view just doesn't show up in the nodes. I'm confused.
#33
Alright, I take it back. It also seems I was suffering from #434920: Arguments not saved or passed.. It should be working now.
#34
This seems to still be an issue and should be re-opened.
I am Using:
Problem: When going into the node edit form, the viewsfield cck reset to none.
Solution:View Names ( machine -readable) over 26 characters seem to trigger this problem,
#35
I have views with names clocking in at 21 and 25 characters in length, and they're suffering from this issue as well.