I'm using 5.x-2.0-rc6 and the Date CCK Fields are not displaying since upgrading

Comments

csandifor’s picture

Priority: Normal » Critical
KarenS’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

This report has nowhere near enough information for me to do anything about it. It may be a duplicate of #296409: Dates disappeared from table and list views, but who knows, since you didn't provide any information whatsoever.

Where are they not displaying? In the node view? In the edit form? In Views? In the Calendar?

And what kind of dates are they, and what kind of widgets, and what kind of environment do you have?

Did you move up to the latest -dev version to see if your problems are fixed by now?

And did you try clearing caches to see if that was the problem? And did you check to see if updates are needed on update.php?

Did you try editing the dates to see if the settings still look right, and saving them again to be sure?

My magic ESP hat isn't working today, so I'm done trying to guess all this stuff.

csandifor’s picture

Priority: Normal » Critical

ESP not necessary I believe this is what you require.

The Date fields are not displaying in node edit. The dates do display in node view.

The dates are well dates.....since they don't display in edit mode there isn't an opportunity to enter or change one. Environment is Drupal 5.9, php 5.2.6, mysql 5.0.45. Please let me know what more I can provide on this item....

As of my original post I had tried the standard troubleshooting steps, installed the latest development release, cleared the cache, and updates were not listed when running update.php.

Thanks for your help.

KarenS’s picture

When you say they don't display in node edit, do you mean you don't see any form at all, or that the forms are there but the values are empty?

If you're saying the field widget doesn't show up at all on the form, that could imply there is something wrong with the field settings, so pull up the field settings form and double check that it looks right and re-save it, even if you make changes (to make sure no bad values are stuck in a cache somewhere). Then try again to edit a node.

If that doesn't work, I need to know what kind of dates? what kind of widgets? An easy way to show me what you have is to use Content Copy to export the field info.

KarenS’s picture

I meant, re-save the field settings even if you make *no* changes.

csandifor’s picture

Ok, so here is what I have got so far

I did check and bounce the permissions (turned off and on) for the dates with no success.

The JS Calendar and Date Popup widgets are turned off, please suggest other widgets to check.

Here is an observation in my pre-upgraded (live) site the Dates field section is visible and configurable under the 'Manage fields' tab of the content types that display date fields. It is also visible and configurable under the 'Display fields' tab on my live site. On the 5.9 staging site the 'Manage fields' tab no longer shows Date, but Date is visible under the 'Display fields' tab.

KarenS’s picture

I suspect your fields used JSCalendar or Date Popup, so turn the Date Popup module on, then clear cache_content. If the field is not showing up at Manage fields, it is likely a field that requires something that is not available any more (like one of those modules). After turning Date Popup on, clear all the caches (esp cache_content()) to be sure everything gets reset correctly.

If you used JSCalendar in the past, there is an update that will update the values to use Date Popup instead, but they won't work if the module isn't turned on. If you already ran the update, your values got updated and things should start working when you turn the module on. Once things are working again, you can change the widget to something else if you like.

JSCalendar is deprecated, so we're moving to Date Popup instead, both because it uses jQuery and because we have more control over it.

If this turns out to be what happened here (you were using JSCalendar but didn't have Date Popup enabled) I see that I need to make an adjustment to the way the fields get updated to be sure this doesn't happen to others.

csandifor’s picture

Well we did have JSCalendar before and our staging site now has Date Popup enabled. Unfortunately the dates still do not appear in edit mode.

KarenS’s picture

We need to find out what widget those fields think they're using. If you still don't see them on the Manage fields screen, try going straight to the url you use to edit another field in that content type and change the name to the date field name. It will be a url like drupal/admin/content/types/story/fields/field_date. If that works, check that a valid widget is selected and save the field. After that see if it now shows up on Manage fields (it should).

If that doesn't work, look in the database to see what we have. Look in the table node_field_instance and find the record that has the right field name and content type name and see what it has for a widget_type. If it says jscalendar or date_popup, change it to date_text and save the record. Then empty cache_content. Then try to get to it via the Manage fields screen.

csandifor’s picture

Ok, that worked. I ended up going into the database and the affected fields have date_js as the widget type. I changed one of the date fields (I have more than one) and it is now visible on the edit screens and in the 'Manage field' tab for the content type. In your previous post you suggested looking for date_popup, since it looks like date_js was the offending widget shouldn't date_popup work?

Thanks for your help.

KarenS’s picture

Yes, date_popup should work, but I was being conservative in case that was not registering for some reason. If it works for you, that's a better choice.

KarenS’s picture

Title: Date CCK Fields still not showing » Dates using jscalendar widget not updated
Status: Postponed (maintainer needs more info) » Fixed

I looked at the update code that was supposed to fix this and it is flawed, so I need to commit a fix to the update to be sure those values get updated correctly in the future. Sounds like your database is now working and I have committed the fix that should keep this from happening again.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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