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.

CommentFileSizeAuthor
#13 3104412-13.patch2.94 KBnicoloye

Comments

zcht created an issue. See original summary.

iuana’s picture

Hi,
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

iuana’s picture

Updated: The same issue is when we create form displays for content types.
I am debugging this and come back with an update.

EmiliaC’s picture

Me 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.

EmiliaC’s picture

Status: Active » Needs review
zcht’s picture

Issue #2511720 does not solve the problem. Here we have a problem with form_steps and the groups module in particular.

EmiliaC’s picture

Indeed, 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

zcht’s picture

thanks 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.

zcht’s picture

Status: Needs review » Active
nicoloye’s picture

Hello 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.

nicoloye’s picture

Status: Active » Needs review
Parent issue: » #3056412: Errors when trying to view the form
StatusFileSize
new2.94 KB

Hello 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.

nicoloye’s picture

Status: Needs review » Fixed

After 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.

  • nicoloye committed 385b20f on 8.x-1.x
    Issue #3104412 by nicoloye: Site's cache must be cleared after adding...

Status: Fixed » Closed (fixed)

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