When trying to revert a feature the following error is thrown:
Error: Cannot use object of type stdClass as array in workbench_email/workbench_email.features.inc, line 98:
$role = workbench_email_get_role_by_name($transition['role']);
This error locks the feature in "rebuilding" state, because the workbench_email component cannot be reverted.
I am attaching a patch for this.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | workbench_email-feature_revert_lock-3.patch | 1.14 KB | jyraya |
| #3 | worbench_email_feature.png | 350.07 KB | jyraya |
| #3 | worbench_email_admin_form_2.png | 140.2 KB | jyraya |
| #3 | worbench_email_admin_form_1.png | 292.5 KB | jyraya |
| workbench_email-feature_revert_lock.patch | 508 bytes | Petrica |
Comments
Comment #2
frosev commentedHi @petrica,
Could you elaborate on how you have currently configured workbench_email? What modules you currently have installed on your site? I'm trying to reproduce the issue.
Comment #3
jyraya commentedHello,
I met the same issue.
To reproduce the issue, I have the following environment:
The "worbench_email_admin_form_1.png" and "worbench_email_admin_form_2.png" screenshots show the workbench-email configuration, and worbench_email_feature.png one what I exported in my test feature.
If I make modifications into the workbench-email configuration and I trigger the feature revert, I got the fatal error.
According to what I observe in the feature file, the settings are included in my feature files as array containing array that are casted as objects:
It is exported as is because in the workbench_email_features_export_render hook, we assigned directly the output of the SQL query in feature export via a "fetchObject" (see line from 60 to 71 of workbench_email.features.inc:
The patch takes this into account.
Comment #5
jyraya commentedComment #6
jyraya commentedOk. The version 7.x-3.x-dev does not exist for the automated test environment.
Can a maintainer fix this in order to continue the issue workflow?
Comment #7
frosev commentedThank you @jyraya. I created the branch I'll test the patch and apply it to the 7.x-3.x version. I'll put a release out in the next week or so.
Comment #8
larowlan