- Issue created by @uv516
- πΊπΈUnited States caesius
Thanks, I've confirmed that the "Save & Edit" button works as of Drupal 11.1.8 and disappears in 11.2.0.
I don't have a lot of time to investigate this independently, so contributions are welcome. The best place to start is to check release notes for 11.2.0: https://www.drupal.org/project/drupal/releases/11.2.0 β
I'll note that it works fine in Drupal 10.5, so any changes that are in both 10.5.0 and 11.2.0 can be ruled out: https://www.drupal.org/project/drupal/releases/10.5.0 β
- π¦πΉAustria maxilein
I have created a version that works for me. Here is the patch. Please check thoroughly I have not tested all functionality.
Maybe someone can work that into git. I don't know how I would that. - πΊπΈUnited States caesius
Hi, a few things:
1. This diff file doesn't follow the standard format for a
.patch
file. It should just be the output ofgit diff
. Please review: https://www.drupal.org/docs/develop/git/using-git-to-contribute-to-drupa... β
2. I get errors when attempting to apply the patch on the current dev version of the module:ββcaesius@roscanvel ~/git/save_edit βΉ8.x-1.x*βΊ β°β$ git apply save_edit_d11.2_compatibility.diff 130 β΅ save_edit_d11.2_compatibility.diff:294: trailing whitespace. } error: SettingsForm.php: No such file or directory error: save_edit.settings.yml: No such file or directory error: save_edit.schema.yml: No such file or directory
3. Most importantly, this makes A LOT of changes, most of which appear unnecessary and were probably done by automatic refactoring.
Please pare this down to only the changes that are strictly necessary to get this working on Drupal 11.2. If the project really needs this much refactoring then that should only be done in the next major version (i.e. for 2.0.0)
- πΊπΈUnited States caesius
I noticed this subtle change in the automatic refactor:
--- a/save_edit.module +++ b/save_edit.module @@ -7,7 +7,7 @@ use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Form\FormStateInterface; -use Drupal\node\NodeForm; +use Drupal\node\Form\NodeForm;
Applying it seems to work on Drupal 11.2, but it breaks on <11.2.
Change record: NodeForm and NodeTypeForm have moved to the Drupal\node\Form namespace β
I have no idea why it breaks considering Drupal core appears to have only deprecated these classes, not removed them.
https://git.drupalcode.org/project/drupal/-/commit/49c6df3c876cc654c1f07...I may need to release a v2.0.0 and require Drupal ^11.2. In the meantime, the attached patch should work.
- π©π°Denmark uv516 Denmark
On a very short test:
I can confirm that the patch seems to work: The "Save & Edit" button is back and it works!It seems that Drupal has moved the "NodeForm" from "Drupal\node\" to "Drupal\node\Form\". You can not use both of them and then it can not be deprecated.
Thank you very much for the patch. The change is very simple. :-)
- πΊπΈUnited States caesius
2.0.0-rc1 has been released and has this change. There's also 2.0.0-rc2 which has the same new features as 8.x-1.9, but rc1 is an option for anyone who wants only the strictly necessary compatibility change; it's otherwise identical to 8.x-1.8.
- πΊπΈUnited States caesius
I went ahead and released 2.0.0 and spun off another issue to address backward compatibility: #3535599: 2.x: Allow backward compatibility for Drupal <11.2 β
I'll be closing this out.
Automatically closed - issue fixed for 2 weeks with no activity.