Closed (fixed)
Project:
Drupal Commons
Version:
7.x-3.2
Component:
Events
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Mar 2013 at 14:45 UTC
Updated:
21 Aug 2013 at 13:45 UTC
Breaking this out from http://drupal.org/node/1955318#comment-7230916. The custom date formatting introduced in Commons 3.1 uses preg_filter(), which requires PHP 5.3+.
Fatal error: Call to undefined function preg_filter() in C:\Users\...\Sites\commons-7.x-3.1\profiles\commons\modules\contrib\commons_events\commons_events.module on line 477
Let's consider remediations, including revising the design to provide a simpler date format that's presentable but requires less processing.
Comments
Comment #1
japerryThe amount of date improvements in 5.3 I think is warranted requiring 5.3. Other modules are starting to require it, I don't think its unreasonable to require 5.3 in this case.
However, we do need to put a version requirement in the info file, so it'll block 5.2 installers from running.
Comment #2
ezra-g commentedWe currently support PHP 5.2 as part of the stated system requirements for Commons 3, so it doesn't seem viable to change that without a compelling reason after the product release
At the very least, we should have fallback behavior that avoids having a fatal PHP error here.
Comment #3
japerryThis should be no longer needed in 3.2 when the date formatter patch is put in: #1950204: Date format for events should match the designs
Comment #4
japerryComment #6
UB commentedThe current download (a/o May 5, 2013) still causes this fatal PHP error on a basic, fresh install when one's server is running PHP 5.2.
I think you'll find that a vast majority of hosts are still using something pre-5.3.
Having to manually alter the database to disable some of the package's functionality, with no suggestion here in the Issue thread about how to then regain that functionality (commons_events) should still be addressed in some way.
I hope the final word isn't that this was "automatically fixed"...
Thanks for your time!
Comment #7
Kamal.M commentedI agree with UB, this is a major issue with my webhosting provider as well. I downloaded the latest avaialble stable distribution of Commons today, installed it and created a new event to get the following;
HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.
The error log shows this entry;
PHP Fatal error: Call to undefined function preg_filter() in /***/profiles/commons/modules/contrib/commons_events/commons_events.module on line 477
I'm able to go back in the browser window which allows me to un-publish the event and the site works again!
My WAMP server works well with PHP 5.4.3, Apache 2.4.2 and MySQL 5.5.24.
I had the same issue with Commons version 7.x-3.1.
Another issue out of the box (could be a separate issue) is the following;
Notice: Undefined index: radioactivity_timestamp in radioactivity_field_widget_form() (line 378 of /***/profiles/commons/modules/contrib/radioactivity/radioactivity.field.inc).
Please HELP!
Comment #8
ezra-g commentedDo you get this error with the April 9th version of the Commons Events module?
http://drupal.org/node/1882512
Comment #9
Kamal.M commentedI will get this tested ASAP.
Comment #10
Kamal.M commentedHey ezra-g,
I got "Commons Events is already installed." when I tried to install the package you recommended. Uninstalling the existing version (7.x-3.2) appears to be tricky due to dependancies...
Comment #11
bsorgdrager commentedhttp://stackoverflow.com/questions/3611107/php-preg-filter-substitute-in...
Maybe this could help developers make this events module backwards compatible with 5.2 release? I'm not an expert in PHP, and not sure of all of the implications of this approach, but figured it'd be worth a share here.
Comment #12
toma commentedI get this error
Fatal error: Call to undefined function preg_filter() in C:\Users\...\Sites\commons-7.x-3.2\profiles\commons\modules\contrib\commons_events\commons_events.module on line 477I rename commons_events.module and get the website up !
I delete all event module folder and replace it with
https://drupal.org/node/1882512
Run drupal update ! install a module
addressfield_tokens
Re run update.
And everything work just perfect :)
Comment #13
csc4 commentedStill happening - just lost my site to this
According to https://drupal.org/node/1955434#comment-7252682 this is 'fixed' - how is it fixed please?
Comment #14
csc4 commentedPlease can you advise what can do to resolve this
My site still down....
There's no suggestion this module is 5.3 only so perhaps suggestion at #11
https://drupal.org/node/1955434#comment-7460692 would help?
Comment #15
csc4 commented#12 helped a lot - I have a site again! thank you! - but now getting
Undefined index: commons_events_attend_event_form_5Comment #16
ezra-g commentedPlease re-open this issue if you continue to experience this problem with Commons 3.3.