When attempting to verify a site in Aegir after upgrading an environment from PHP 7.0 to PHP 7.2, the following error is shown:

Drush command terminated abnormally due to an unrecoverable error. Error: Declaration of RulesConditionalEmptyUI::form(&$form, &$form_state, $options = Array) must be compatible with RulesContainerPluginUI::form(&$form, &$form_state, $options = Array, $iterator = NULL) in /var/aegir/platforms/drupal-7.58/sites/SITE/modules/rules_conditional/includes/rules_conditional.ui.inc, line 56

This occurs on the newest 7.x-2.x-dev of Rules which already includes the patch from #2923477: PHP 7.x compatibility issue. I'm also on the newest 7.x-1.x-dev of Conditional Rules.

Comments

NWOM created an issue. See original summary.

nwom’s picture

Project: Rules » Conditional Rules
Version: 7.x-2.x-dev » 7.x-1.x-dev
Component: Rules Core » Code
nwom’s picture

Issue summary: View changes
nwom’s picture

Status: Active » Needs review
StatusFileSize
new1.78 KB

Here is a patch that should fix this. Please review.

marcoka’s picture

thank you. no errors no more. without that patch its also impossible to deactivate that module.
if you delete it manually you will get more problems.

very important patch. also needed fpr just removing the module!

alansaviolobo’s picture

Status: Needs review » Reviewed & tested by the community

+1 reviewed

akolahi’s picture

Works

alansaviolobo’s picture

Status: Reviewed & tested by the community » Fixed
nwom’s picture

@alansaviolobo: Why would I not get commit credit?

alansaviolobo’s picture

You have been given credit.

Issue #2959426 by NWOM: Incompatibility with PHP 7.2

nwom’s picture

That is credit for creating or being active in an issue. Instead there is a separate commit credit, as you can see at the bottom of any Drupal profile.

It's not a huge deal, but for people like me that are slowly starting to create patches for the community, it would be nice to have the commit credit.

alansaviolobo’s picture

StatusFileSize
new124.66 KB

Your are already credited on your profile ( as per the black arrow).
But, as I understand it, you would like that entry at the red arrow ?
If I am not mistaken, for this to happen, I would have to give you repo access and you would have make to commit.

nwom’s picture

@alansaviolobo: Nope, I don't need repo access. All of the other commits that were credited to me, were done by whoever closed the issue. This is sadly out of my area of expertise (since I have never been a module maintainer).

Again, it's not a huge deal, but would definitely be nice for you to know how to do in the future, for others like me that enjoy that "+1" on their profile.

tr’s picture

would definitely be nice for you to know how to do in the future

@alansaviolobo:
If you use the git command listed at the very bottom of this page, then it assigns authorship properly:
git commit -m 'Issue #2959426 by NWOM, alansaviolobo: Incompatibility with PHP 7.2' --author="git <git@603482.no-reply.drupal.org>"

The key part is the --author option. drupal.org populates that option with the e-mail address that the patch author has set up on his/her account. NWOM appears to have this set as "git ".

nwom’s picture

@TR: Thank you. I'll take note of that for the future, since I am meaning to create my first module soon.

tr’s picture

@NWOM, (and @alansaviolobo too!): Feel free to pm me if you have any questions about maintaining modules.

alansaviolobo’s picture

Thanks @TR
I usually just take the text from the "Message Only" section rather than "Git Command" section and use my IDE to make the commit. that is how the author part got skipped. have taken a note of it.

nwom’s picture

@TR Thank you for the offer. I'll definitely keep that in mind! :)

Status: Fixed » Closed (fixed)

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

mdmanouwer’s picture

thanks above patches when i applied to my repository fixed my issue
.

let me know if any body have issue on
applying patches

email me mdmanouwer@gmail.com

graysonecooper’s picture

I'm still getting this error (on running update.php; otherwise 500 error for all pages on my site) on upgrading to php7.2. Backing down to php7.1 resolves. All modules/core is updated to recent, and Rules Conditional is 7.x-1.0-beta2.

It seems that this patch has been committed and included in the latest stable release, but wanted to check if I was missing something.

Thanks for all the hard work in getting things ready to go for php5.6 EOL!

aytee’s picture

Updating to 7.x-1.x-dev solved the problem for me. Thanks!

howdytom’s picture

#4 worked liked a charm. Thanks a lot!

massiws’s picture

Updating to 7.x-1.x-dev solved the problem for me too.
Is there any reason to remain in beta?
Thanks.

marco aurelio rocca’s picture

StatusFileSize
new1.22 KB

Didn't get solution using DEV. :(
Got it with an extra pach, other than #4. Can anyone help checking?

bessonweb’s picture

#4 Worked well ! Thanks for the patch.

zlatev’s picture

StatusFileSize
new1.13 KB

Encountered the same issue on 7.x-2.10
The patch from https://www.drupal.org/project/rules_conditional/issues/2959426#comment-... resolves the problem but it should be applied from docroot and if you are using a profile or other structure this is an issue. Posting a patch which can be applied from module root folder.

alansaviolobo’s picture

The patch provided in #26 appears to be for the Rules and not the Rules Conditional Module.

Check PHP 7.x compatibility issue

aswathyajish’s picture

Thanks. Patch in #4 worked for me.