Problem/Motivation
It is not possible to change the unlocked and locked image for the achievements. Only the default ones work.
If you try to change it, WSOD with this error:
Error: Call to a member function get() on null in Drupal\achievements\Form\AchievementEntityForm->submitForm() (line 228 of modules/contrib/achievements/src/Form/AchievementEntityForm.php).
Steps to reproduce
- Install achievement 2.x-dev or 3.x-dev.
- On achievement type create a new type.
- Disable default image.
- Compile one or more of the fields related to the image.
- Click save.
Also tested on simplytest.me with achievement 2.x-dev and Drupal 9.5.1
Issue fork achievements-3333507
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 #4
nico.b commentedThere actually seem to be two errors with the image upload and path.
First, as described above,
appears when uploading an image. If setting the path manually, another error occurs due to the usage of deprecated/removes APIs:
I submitted a patch (as a merge request) that should fix both issues.
I'd appreciate a review.
Comment #5
grasmash commentedRelated changes were made here: https://www.drupal.org/project/achievements/issues/3182487
Is this still an issue?