Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi there,
Here is my issue: I can create a node containing a date (popup widget) and save it, the date will appear on the node view. If I want to get back to the editing, the date is empty.
Everything was working fine under PHP 5.3, now that my server is running PHP 5.4 I have the same issue for several websites. Running the same website on a PHP 5.3 localhost will make everything work again...
Not sure if related, seems to be the same issue for other modules:
http://drupal.org/node/1159880
http://drupal.org/node/1453570
Any ideas???
Thanks
Comment | File | Size | Author |
---|---|---|---|
#19 | date_popup-1808416-19-php5.4.patch | 1.37 KB | mikeytown2 |
#8 | date_popup.module.patch | 1.18 KB | bkat |
Comments
Comment #1
jackalyst CreditAttribution: jackalyst commentedThis is my exact same issue.
In my logs I get "Illegal string offset 'month' in /.../includes/form.inc on line 1345"
Same error applies for second, hour, day, year...
Comment #2
ptitwolfy CreditAttribution: ptitwolfy commentedAnyone else with same the issue? Any ideas how to fix it?
Thanks
Comment #3
MEGAWATT CreditAttribution: MEGAWATT commenteduse this to fix 1345 http://drupalcontrib.org/api/drupal/contributions%21date%21date_popup%21...
but it do not fix echo date time and time
Comment #4
MEGAWATT CreditAttribution: MEGAWATT commentedhow to looks date and time in page node edit , drupal 6, php 5.4.6
do this:
1st of all fix you code similarity http://drupalcontrib.org/api/drupal/contributions%21date%21date_popup%21...
all changes in date/date_popup/date_popup.module
1. in function date_popup_process_date change
change to
next step
change to
2. in function date_popup_process_time change
change to
and
change to
Comment #5
ptitwolfy CreditAttribution: ptitwolfy commentedThanks so much, it's working perfectly now!
Comment #6
indydas CreditAttribution: indydas commentedThis fix didn't work for me. When I use date and time too after a content type import the dates and times are empty.
Comment #7
nicobot CreditAttribution: nicobot commentedSubscribing [#4] fixes the problem for me, actually just taking out the conditional
works like a charm :)
Interesting thing,
$element['#value'] = "2013-01-01";
In PHP 5.3:
empty($element['#value']['date']) ? => true
PHP 5.4:
empty($element['#value']['date']) ? => false
Thanks!
Comment #8
bkat CreditAttribution: bkat commentedAll you need to do is remove the
['time']
from$element['#value']['time']
in date_popup_process_date and date_popup_process_timeWorks for me in php 5.4.10 and 5.2.17.
Patch included -- built against 6.x-2.9+6-dev
Comment #9
GreenSkunkAfter upgrading to PHP 5.4.10 from PHP 5.2.x, I had the issue when editing the date fields that used the date popup were empty. Patched 2 sites Drupal 6 sites running on PHP 5.4.10 and date fields are populated again.
Others please review and test.
Thank you fellow Drupalers!
Comment #10
TajinderSingh CreditAttribution: TajinderSingh commented#8 works perfect.
Comment #11
rterrero CreditAttribution: rterrero commented#8 works perfect for me too!
Comment #12
powery CreditAttribution: powery commented#8 works fo me, please send it to the dev version
Comment #13
ryan_courtnage CreditAttribution: ryan_courtnage commented#8 working here
Comment #15
arlinsandbulte CreditAttribution: arlinsandbulte commented#8: date_popup.module.patch queued for re-testing.
Comment #17
NaX CreditAttribution: NaX commented#8 Worked for me, thanks.
Comment #18
ice5nake CreditAttribution: ice5nake commentedPatch worked for me.
I had to use the patch command without the -p1 to get it to work for me.
I've seen patches sit in "needs work" because of a failed test more than once.
It'd guess the test failed because the test uses the -p1 option
git apply --check -p1 /var/lib/drupaltestbot/sites/default/files/review/date_popup.module.patch
Comment #19
mikeytown2 CreditAttribution: mikeytown2 commentedRerolled #8
Adding in text for search purposes
Warning: Illegal string offset 'year' in _form_set_value() (line 1345 of includes/form.inc).
Warning: Illegal string offset 'month' in _form_set_value() (line 1345 of includes/form.inc).
Warning: Illegal string offset 'day' in _form_set_value() (line 1345 of includes/form.inc).
Warning: Illegal string offset 'hour' in _form_set_value() (line 1345 of includes/form.inc).
Warning: Illegal string offset 'minute' in _form_set_value() (line 1345 of includes/form.inc).
Warning: Illegal string offset 'second' in _form_set_value() (line 1345 of includes/form.inc).
Comment #20
kerasai CreditAttribution: kerasai commented#19 applied cleanly to 6.x-2.9 for me and allowed the date values to render on node edit screens.
+1 RTBC
Comment #21
kerasai CreditAttribution: kerasai commenteddensolis assisted me to find out that the test is not running due to the 6.x-2.x branch not passing testing. In order to move forward either the patch need to be manually reviewed or a maintainer needs to fix up the branch so the patch can be automatically tested.
Comment #22
mattwmc CreditAttribution: mattwmc commented19 worked.
Thanks a lot.
Comment #23
mikeytown2 CreditAttribution: mikeytown2 commentedComment #24
m.stenta+1 on the RTBC... this fixed the issue on my site.
Comment #25
cafuego CreditAttribution: cafuego commentedPatch applied and pushed to 6.x-2.x. Thank you!
Comment #27
interestingaftermath CreditAttribution: interestingaftermath commentedI've applied the patch and I've also upgraded to 6.x-2.x but I am still experiencing this issue. Anyone else?
Comment #28
Projet Oeb CreditAttribution: Projet Oeb commentedinterestingaftermath, try dev version.
Comment #29
cyxair CreditAttribution: cyxair commentedSame issue here , with 6.x-2.10 and 6.x-2.x-dev.