I use this wonderful module with the Group Module (https://www.drupal.org/project/group). In connection with this module there is an error, probably caused by Group itself, see linked issue.
But when I install my fix and try to call my workflow I always get the following error message:
Site's cache must be cleared after adding new form mode:my_group on group_content
However, the cache has been emptied, also drupal update:entities unfortunately does not bring success.
Unfortunately I could not find an issue for this problem, but I think it has to do with the 'Forms Steps' module.
I would be happy about ideas, so that I can solve my problem.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | 3104412-13.patch | 2.94 KB | nicoloye |
Comments
Comment #2
iuana commentedHi,
I also have the same issue. I've created some form display for a group type, attached then to the form steps.
Accessing the first form step the error is thrown and the message is this one:
Site's cache must be cleared after adding new form mode:general_information on group
Comment #3
iuana commentedUpdated: The same issue is when we create form displays for content types.
I am debugging this and come back with an update.
Comment #4
EmiliaC commentedMe and Ioana are using Drupal 8.8.2 and we had the same error.
Seems to be related to this core issue - https://www.drupal.org/project/drupal/issues/2511720
We applied patch 2511720-37.patch and this solved the issue for us.
Comment #5
EmiliaC commentedComment #6
EmiliaC commentedComment #7
zcht commentedIssue #2511720 does not solve the problem. Here we have a problem with form_steps and the groups module in particular.
Comment #8
EmiliaC commentedIndeed, issue #2511720 alone does not solve the problem.
There is also this patch for the Group module that we applied: https://www.drupal.org/project/group/issues/2833054
Comment #9
EmiliaC commentedComment #10
zcht commentedthanks for the tip. ok, this actually works partly. i created three steps in my configuration.
step 1: create a group
step 2: create content 1 in this group
step 3: create content 2 in this group
step 1 works really well now. in step 2, I have the same mistake again. cache clear still does not work.
i have connected my content via the gnode. it is an own content type which is available in the group.
Comment #11
zcht commentedComment #12
nicoloye commentedHello everybody, I'll try to reproduce your issue and see what can be done.
Maybe we are lacking a proper cache clear in a method somewhere, let me check.
Comment #13
nicoloye commentedHello everybody,
I finally found the core of this issue.
The problem is the same we already encountered in an old issue regarding the way the core handles form classes.
A patch was proposed but the solution was too specific, only handling node and user entities.
See this issue for more details : https://www.drupal.org/project/forms_steps/issues/3056412
Here I refactored the code to propose a more generic solution, so now the module should be able to define default classes for any entity type that exposes at least a "add" operation. If no form class is provided for a given form mode the module will search, in this order, the following operations and associated form classes : "register", "default", "add".
If none of these are defined the README.md file describe a way to implement hook_entity_type_alter() to solve this.
I also added a cache clearing for specific tags each time a step is saved, this should fix the cache issue we had until now.
Please test the patch and tell me if it helps.
Comment #14
nicoloye commentedAfter several tests on my side I'm quite confident the patch do work as intended.
Feel free to reopen this issue if it doesn't fit your needs.