Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading module to work with current code versions #2

Open
bcobin opened this issue Jan 29, 2019 · 7 comments
Open

Upgrading module to work with current code versions #2

bcobin opened this issue Jan 29, 2019 · 7 comments

Comments

@bcobin
Copy link

bcobin commented Jan 29, 2019

I've been upgrading sites to 7.63, Civi 5.9.1 and PHP 7.1 and run into a few things that might prove useful.

  1. The GitHub fork of the module causes an "unsupported" alert - what's worked for me is using a patched version of the latest production release using the patch from here:

https://www.drupal.org/project/civicrm_multiday_event/issues/2660706

  1. That's not enough, though - you still get the following error upon creating an event:

• Warning: Illegal string offset 'und' in drupal_array_set_nested_value() (line 6789 of /home/[site]/public_html/includes/common.inc).
• Error: Cannot create references to/from string offsets in drupal_array_set_nested_value() (line 6789 of /home/[site]/public_html/includes/common.inc).

The following change in core fixes the error and now, events can be created:

https://www.drupal.org/node/2313517

But... obviously, patching core is a bad thing - if there's any way that the module can be made "safe" for later software versions, that would be great. In the meantime, perhaps this will be helpful to someone.

@ericfg
Copy link
Contributor

ericfg commented Jun 12, 2019

the new release might fix all the issues you are talking about. please give it a test and let me know. https://github.com/cm-advanced/civicrm_multiday_event/tree/7.x-2.3

@bcobin
Copy link
Author

bcobin commented Jun 13, 2019

Thank you so much for this! The old module seems to be working if I patch core, so In the old tradition of "if it ain't broke," I'll install this on my sites that use it upon the next Drupal core update, which, I'm sure will happen all too soon, sad to say. Thanks again!

@bcobin
Copy link
Author

bcobin commented Feb 3, 2020

Nope. I've been patching core and finally decided to try this on a site that's virtually dormant and I got the below after replacing the module. This is on PHP 7.2 BTW. Thanks for trying...

drush updb
WD php: ParseError: syntax error, unexpected '}', expecting end of file in drupal_load() (line 318 of [error]
/home/[site]/public_html/sites/all/modules/civicrm_multiday_event/civicrm_multiday_event.module).

@bcobin
Copy link
Author

bcobin commented Jun 20, 2020

Going through another Drupal core update, so I figured I may as well reach out again. I know that it's only 61 installs, so what can one expect? But I do use it extensively - see implementations at https://suffolkcountydems.com/events-roundup (including feed items), https://usgbc-li.org/event/calendar and https://babylonida.org/events/calendar

On Drupal 7.22 (most recent as of this post), line 2106 of includes/form.inc needs to be changed from:

drupal_array_set_nested_value($form_state['input'], $element['#parents'], NULL);

to

drupal_array_set_nested_value($form_state['input'], $element['#parents'], NULL, TRUE);

and then things work as expected, at least as far as CCMDE is concerned. The change hasn't seemed to effect site operations otherwise, but having to patch core each time to get CCMDE to work is scary.

Any guidance greatly appreciated - thanks in advance and for the module in general!

@ericfg
Copy link
Contributor

ericfg commented Jun 20, 2020

so little time these days but I promise to put this on my to-do list so you can stop having to hack on core each time.

@bcobin
Copy link
Author

bcobin commented Jun 21, 2020

Thank you SO much, Eric - most gratefully appreciated!

@seascoot
Copy link

@bcobin I appreciate your community mindedness in posting the patch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants