Problem/Motivation
Code in FormHelper classes seems unnecessarily confusing and complicated. This makes it difficult to add new features and fix bugs that affect these classes. Simplifying the code and implementing a clear structure will solve this problem.
Proposed resolution
Implement a clear mechanism for altering entity forms. Simplify code in FormHelper classes and move the form alter itself into separate classes.
User interface changes
No changes.
API changes
No changes to the public API (hooks, entities, plugins).
Data model changes
No changes.
Issue fork simple_sitemap-3271721
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
walkingdexter commented@gbyte I worked hard on this issue behind the scenes, please review the above changes. Maybe you have some additions or comments. Or maybe you disagree with the proposed implementation. Thanks!
Comment #4
gbyteIndeed this looks like a ton of work. I haven't had time for a full review yet, but I glanced through the code and I find it has improved a lot - very clean and well structured. What I did find is an exception thrown whenever I click on a 'Configure' Button on /admin/config/search/simplesitemap/entities - can you take a look?
Comment #5
walkingdexter commentedComment #6
gbyteThanks for the fix; I just found some more time to test and found another bug:
When page bundle of the node type is enabled, saving the bundle on admin/structure/types/manage/page while IndexNow checkbox is checked makes the engines module want to send the bundle entity to IndexNow (which fails with an exception, as it does not have a canonical route).
Instead what should be happening: An IndexNow default should be set for entities of that bundle. 4.x does not have that problem yet.
Comment #7
walkingdexter commentedYep, my bad. The fix is ready.
Comment #9
gbyteGreat work, thanks.
Comment #10
gbyteWhat happened to the tests?
Comment #11
walkingdexter commentedThis looks strange. Retest doesn't help. It seems that the problem is not in the module (according to the error description).