I’ve just read some posts about same topic but they were more related to sending notifications. So let me just explain my issue.
We have some rules in D7 to be migrated to D8. Problem is, after I installed the D8 Rules module I miss some functionalities. It seems the project is been discontinued or no one is taking care of it.
First, there is no import rule option so they need to be re-created.
In D7 rules module, we capture the event 'saving content of type ‘EN-CV Project’ in order check some values and change a field value.
In D8, we can’t select the content type ‘EN-CV Project’ so we need to enter the values without any reference. The way to enter the values is not well documented making difficult to enter any value.
Then, we specify the value of the fields we want to check to do some comparisons :
This menu is not the same in D8 so it is also impossible to find both the fields and values as in D7 module.
My question is, is it the module itself that needs to be upgraded or I’d need to use another module to do this in D8?
Do you know about any other module I could use for this purpose?
The Rules module is in alpha state and it’s missing many of its Drupal 7 features. From what I see in the module’s page, there is dev version that it was last updated on 22 May 2020.
You can download this version and install in your website. Mount your website’s filesystem, put the Rules dev version under the modules folder. Then go to https://yourwebsitename.web.cern.ch/update.php to check if any database updates are required and if so apply them. Clear the caches.
Just have in mind that you shouldn’t have any alpha or dev versions of modules on a production website. Usually these kind of versions are unstable. I will do that only if it is necessary and always keep an eye on these modules.
I don’t know of any other module similar to Rules.
Will see if I manage to make it work…I’ll let you know.
Just as a final step in your instructions, I also needed to go to admin/extend and install the new module (this time the updated dev version). Otherwise the rules component is not available at config page.
I thought you had it already enabled in alpha version. If you didn’t then yes you need to go and install it in Extend after you copy it in the modules folder.
I moved a bit forward but still can’t find the fields inside EN-CV Project. The Data selector doesn’t work as expected and there is no clue on how to find it.
So I try to enter something like ‘node.field-cv-cl-start-’(this is suposed to be the field I try to compare):
The Rules module is quite different in Drupal 8. I managed to make it work in another website though.
First create a condition Entity is of bundle. In Data selector field put node, in Type value node, in Bundle value the machine name of your content type.
Then create a condition Data comparison. In Data to compare put value the field name (e.g. {{ node.body.value }} ) then choose the Operator and the Data value and save.
The Rule I created on another website is with the alpha version of the module and works fine.
I suggest that you create a backup with the current state of your website, then uninstall the Rules module, mount your website’s filesystem and delete the module’s folder and then clear caches.
After enable the Rules module provided by the infra and check again. Maybe the errors are caused by the dev module. If you still get the error you can revert the website from the backup and we can take a closer look.
Hi Sotirios,
I must say it doesn’t work neither. It works only for the first rule. I think there is a bug when a second one is created.
I notified the problem in the Drupal site. Let’s see if I receive any feedback.