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

Junro - March 28, 2009 - 22:02

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

libeco - March 29, 2009 - 11:50

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

Junro - March 29, 2009 - 15:18
Title:Viewfields reset to none, how to put back my settings?» Viewfields reset to none after updating last dev. version 27-03.

Yes you're right, place back the old (dev-version) viewfield module works.

It's not the first time it's happen.

#4

jerdavis - March 29, 2009 - 19:14

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

jerdavis - March 29, 2009 - 19:15
Status:active» postponed (maintainer needs more info)

#6

Rosamunda - March 29, 2009 - 19:55

+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

jerdavis - March 29, 2009 - 19:54

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

Rosamunda - March 29, 2009 - 20:00

This is what I´ve been using. (Attached). Thanks for your help!

AttachmentSize
viewfield.zip 34.85 KB

#9

Junro - March 29, 2009 - 20:08

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

jerdavis - March 29, 2009 - 20:19

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

Junro - March 29, 2009 - 20:25

Drupal 6.3 (I know I should update the last version)
Content Construction Kit (CCK) 6.x-2.x-dev (2009-mars-27)

#12

Rosamunda - March 29, 2009 - 21:44

I´m using Drupal 6.10, and same CCK version as Junro.

#13

jparets - March 30, 2009 - 15:54

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

prunelle - March 31, 2009 - 09:51

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.

AttachmentSize
Viewfield_up.png 72.52 KB
Viewfield-down.png 85.93 KB

#15

petrd - March 31, 2009 - 22:38

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

Rosamunda - March 31, 2009 - 23:41

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

jerdavis - April 1, 2009 - 17:46
Status:postponed (maintainer needs more info)» active

These are the known cases for disappearing viewfield views:

  • Previewing a node with a viewfield (fixed in 3/27 snapshot)
  • Updating a node with a viewfield when content field permissions prevented the user from accessing the viewfield (fixed in 3/27 snapshot)
  • Updating a node's status from admin/content/node (fixed in 3/27 snapshot)
  • Having a view name (with display name) greater than 32 characters
  • Moving from 8/27/08 D6 snapshot or D5 to 02/10/09 snapshot or greater

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

Darren Oh - April 6, 2009 - 18:54
Status:active» fixed

Fixed in CVS commit 193572. The fix will be applied when you run update.php.

#19

Junro - April 14, 2009 - 21:29
Status:fixed» active

Fixed with Viewfield 6.x-1.x-dev (2009-avr.-08) ?

The new dev version doesn't fix the problem for me.

#20

Darren Oh - April 17, 2009 - 16:24

Did you run update.php?

#21

Junro - April 17, 2009 - 20:58

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

Junro - April 17, 2009 - 19:48
Status:active» fixed

#23

Junro - April 17, 2009 - 20:56
Status:fixed» active

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

richardwdoe - April 28, 2009 - 14:52

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

libeco - May 4, 2009 - 12:35

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

Darren Oh - May 19, 2009 - 18:00

Duplicate issue 460900.

#27

Darren Oh - May 24, 2009 - 03:02
Title:Viewfields reset to none after updating last dev. version 27-03.» Viewfields reset to none after updating
Priority:normal» critical

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.

AttachmentSize
viewfield-formatter-416922-27.patch 2.25 KB

#28

Darren Oh - May 19, 2009 - 21:56
Status:active» needs work

#29

Darren Oh - May 24, 2009 - 05:34
Status:needs work» fixed

Fixed in CVS commit 215694.

#30

System Message - June 7, 2009 - 05:40
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

#31

libeco - June 7, 2009 - 16:52

I can confirm that the latest dev verson works without a problem for me. No more views disappearing...

#32

antiorario - June 11, 2009 - 06:14
Status:closed» active

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

antiorario - June 11, 2009 - 06:21
Status:active» closed

Alright, I take it back. It also seems I was suffering from #434920: Arguments not saved or passed.. It should be working now.

#34

mhunt - September 11, 2009 - 19:03
Priority:critical» normal
Status:closed» active

This seems to still be an issue and should be re-opened.

I am Using:

  • Viewsfield 6.x-1.x-dev
  • Views 6.x-2.6
  • Content Construction Kit (CCK) 6.x-2.5

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

Eidolon Night - October 20, 2009 - 17:13

I have views with names clocking in at 21 and 25 characters in length, and they're suffering from this issue as well.

 
 

Drupal is a registered trademark of Dries Buytaert.