Data does not show view until resave content type?
pamreed - June 3, 2009 - 18:23
| Project: | Viewfield |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed |
Jump to:
Description
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

#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