Posted by pamreed on June 3, 2009 at 6:23pm
Jump to:
| Project: | Viewfield |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (works as designed) |
Issue Summary
Hi
I added a field of viewfield to a content type that was already created and had data all ready entered. Then add the viewfield to view to show the data. However, that data does not show. If I go and edit the content and re-save, then the data shows up. Is this by design? This there a way to have it refresh the data once add the viewfield. Or away save all the content again all at once vs having to edit each one individual content data again?
Thanks
Comments
#1
This is a side effect of current design.
If for example I have content type page, and I already have:
page 1
page 2
page 3
I then add a viewfield to content type page, and set it to have a default value of "referenced_nodes - defaults".
Now, I create page 4. Page 4 gets it's viewfield populated and everything works fine. But page 1, 2, and 3 still show nothing. That's because the database table storing the information for what view and arguments to use hasn't been updated for page 1, 2, or 3. They already existed. So those columns are null.
We're looking at re-architecting this a bit, however it's somewhat tricky - especially when you take into account an upgrade path.
Right now you'd need to re-submit each of the existing nodes, or run a SQL query to populate the columns with the correct value.
Jer
#2
This is by design. And we'll likely remove the extra "global default" handling very soon over in #489908: Per field instance default value settings, since neither CCK in D6 nor Field API in D7 implement this concept. That is, because users expect that already saved content stays the same, even after changing the site's configuration.