- Issue created by @trigdog
- Merge request !533Replace the use of drupal_static using the Cache API → (Closed) created by Unnamed author
- 🇺🇸United States trigdog
The merge request seems to fix the problem for the simple_multistep module on first test but I do not know how it would affect the others calls to the _gin_form_actions function in top_bar.theme and local_actions.theme because I have to clear it once it is used or it shows up on pages you don't want it to.
drupal_static seems to be for static content. The simple_mutliform module uses dynamic action buttons during each step. Sometimes a next button will appear, or a back button or both. The save and preview buttons are also hidden and unhidden using the #access property depending on the step in the process. These dynamic changes do not seem work with drupal_static. We may be able to modify the use of drupal_static with a unique name parameter for each step but I couldn't think of a way to call the unique names in page.theme.
- 🇺🇸United States trigdog
After more digging, it seems this may be caused by the simple_multiform call to rebuild their form_alter so any step after the first step is calling the gin_form_alter twice (once for the first load and a second for the rebuild) and drupal_static is not updating the $actions value on the second request. Is there a way make drupal_static work in this scenario?
- 🇩🇪Germany jurgenhaas Gottmadingen
The caching approach is not required for this. Instead, we can use a simple static variable to resolve this issue instead of using
drupal_static
.I've fixed that as part of 📌 Improve sticky actions implementation Active and it works with simple_multistep. Please test MR!536 and let us know if that fixes the issue for you as well.
Note: you don't need to create a patch for testing this. You can either check out the branch of that MR or you use https://git.drupalcode.org/project/gin/-/merge_requests/536.diff as your patch. This is the best way for testing, as long as you don't do that in production, as that patch can change over time, until it will be finally merged.
- 🇮🇳India diwakar07
Hi,
Since the issue https://www.drupal.org/project/gin/issues/3468961 🐛 Problem since rc11 with Action buttons Active , mentioned in the issue summary has been reviewed and fixed, this shall be moved as well.I have already reviewed MR !536, it successfully fixed the button issue with Simple Multistep module, and module seems to be working fine with gin.
Hence moving this to RTBC!Thanks.
- 🇩🇪Germany jurgenhaas Gottmadingen
Thanks for testing and feedback @diwakar07. Marking this as fixed and granting issue credits, the fix will be merged with the related issue asap.
Automatically closed - issue fixed for 2 weeks with no activity.