I get the subject line warning when I am importing XML via FEEDS XPATH parser. The XML input has date set right but after ingestion the date field defaults to current date. I checked and found that the default is set to NONE.
So there are 2 issues. One is why is date not getting parsed right and other why is it defaulting to current date.
can someone explain if the Theme key warning is causing these issues?
Location - http://nh-mnair-dt1/drupal/admin/structure/types/manage/eventful-feed-it...
Referrer - http://nh-mnair-dt1/drupal/admin/structure/types/manage/eventful-feed-it...
Comments
Comment #1
karens commentedProblems using xpath to import values are not critical bugs that make this module unusable.
Comment #2
colanI think this is more generic than that. (Updating title.) I'm getting this message and not using xpath at all.
When clicking on "edit" to edit the field instance settings on the "Manage fields" tab of bundle, this error shows up:
What's strange is that it only happens if the widget type is not "Select list". If it's "Pop-up calendar" or "Text field", then you get the error when clicking on edit.
Comment #3
andypostSame here for D7
Happens when editing date field
Comment #4
arlinsandbulte commentedI cannot reproduce this error.
Comment #5
karens commentedI cannot reproduce this error either. Someone has to figure out how to replicate the error on a fresh install with just the Date module enabled. If you can't do that, it is probably related to some other module. But if we can't reproduce it there is nothing that can be done.
Comment #6
Daedalon commentedDate Popup module seems to be the cause. When it's enabled in 7.x.2.0-rc1, I get the same in my error log after following the edit field link in content type:
I believe this has happened since alpha4 or earlier. With Date Popup disabled, this doesn't occur. The only other Date/Time modules enabled were Date and Date API. Changing admin theme between Garland, Stark and Seven didn't produce any changes.
Comment #7
karens commentedUnless someone can tell me how I could reproduce this on a fresh install, nothing can be done (i.e. create a brand new site with just Date module, create a field, and look for the error). I can't reproduce it and I doubt anyone can reproduce it on a fresh install, plus lots of changes have been committed since it was reported so it may not even still be an issue. Theme key messages are not likely coming from here.
Comment #8
Macronomicus commentedfor me, any node type that has a date field upon view or edit throws a wsod and I get the error.
In the end the only thing that worked for me.... without removing the actual date fields or my views, I fully uninstalled all date related modules and reinstalled and now the problem is gone, so I cant tell you how to reproduce it, but I can confirm the symptom may be more than just a one off from the OP.
Comment #9
seren10pity commentedI get exactly the same issue :
I've got a content type that is filled from an XML file via FEEDS XPATH parser.
In the XML file, i've got this tag
<MY_TAG MY_DATE="30/04/2011" MY_TIME="01:30:00" />, and my field is an ISO date field whose date entry is in the custom format d/m/Y.When importing data, the date saved is the current date, even if I check "No default value" in the settings.
I'm sure the xpath is correct because the time field has exactly the same configuration with "H:i:s" custom entry format, and it is saved correctly ; and the debug options give me the correct attribute too.
So, as the current date is registered, I guess the entry data is not given in the correct format. I've checked the logs, and I get this error :
Theme key "" not found.for htis field.Hope it helps to reproduce the bug, and find a solution...
Thanks in advance ;)
Comment #10
karens commented#9, your failure is probably because you have the date in the wrong format. Dates coming in from feeds need to be in the native format and timezone, i.e. YYYY-MM-DDTHH:MM:SS or a timestamp or whatever. If the date you import is nonsense to the date field, it will end up as the current date. The fact that you have created a custom format in the form element does not apply to a date imported from a feed, which does not use the form at all.
Comment #11
seren10pity commentedThanks KarenS for your fast answer ! I understand better now.
It worked for time fields because the XML gives "
01:35:00", what is the expected format for time, so it registered "2012-07-10T01:35:00" (given time with today's date).It would have worked for date fields if the XML was giving the date in the format
d-m-Yinstead ofd/m/Y.But I can't change the input format of the XML date attributes. The file comes from a private software for management of events sales.
So I'll have to find a way to alter the data on import.
I just found this hook : hook_feeds_after_import(). I'll test it tomorrow and see if it works ;)
Thanks again !
Comment #12
seren10pity commentedHi !
Here's my solution : hook_feeds_after_parse(FeedsSource $source, FeedsParserResult $result)
the object returned by $result looks loke this :
So, I've made a function to replace / by - in dates if the format corresponds :
Maybe it's not very optimized (I'm open to suggestions) but for me, the date problem is solved ;)
Comment #13
jnettikSorry to open this up again but I'm having the same problem and I'm not using any feeds on my site.
I have a product display for events (drupal commerce site) and I added a date field with a calendar popup widget. Whenever I try to edit the date settings I get a 500 internal server error (localhost using mamp) and none of my settings got saved.
One of the comments said that it may be related to the popup module. I disabled that and still the same problem. I checked watchdog and get this warning:
In checking my PHP log I show the following error. That's all I have for now. I'll still keep digging and see if I can find more to share.
Comment #14
jnettikAh... Just found this issue that my problems were related the the Field Label Plurals module and the issue #1699312: Fatal error: Call to undefined function date_field_widget_settings_form_validate() in form.inc
Comment #15
n8handler commentedI had this problem today and was able to fix it by switching away from popup calendar and then back to popup calendar.
Comment #16
jphil commentedthis is something wider than just the date module - I've experienced this 'out of the blue' whilst working on a completely different section of my site... will post solution
Comment #17
jphil commentedHa! very interesting... here's what I've found:
The theme key (referring to a .tpl.php) missing in my context was defined in a custom module (hook_theme obviously) that I had disabled and then re-enabled a couple of times. This was most likely the trigger in my setup.
Prior to that my theme call was working fine from within the page preprocessor function in template.php.
Once I made the possible connection, I moved the hook_theme from the module into template.php and it works again.
Either cache related, or perhaps something to do with the fact that my theme and the module in question had the same name. No time to dig deeper now ;)
So I doubt the Date module is the culprit here!
Comment #18
lsolesen commentedComment #19
lsolesen commentedComment #20
sonicthoughts commentedhaving this issue with a page, not XML. recently upgraded from D6 to D7 ... still investigating.
Comment #21
trong.nguyen.tcec commentedDear all,
Code error is at return array_key_exists($offset , $this->storage) when $offset is NULL.
Just change the code as below: on line number 414 to 422 file includes/theme.inc
I tested on Drupal 7.21.
I hope it helpful.