Problem/Motivation
Hi there. I'm upgrading a website from Drupal 9 to Drupal 10. In Drupal 9, version 3.0.0-beta5 of Simplenews is used and on one of the content pages, there is a link with the following structure: /newsletter/subscriptions
This link takes any user to the effective URL for the subscription management page, which would be: /user/1/simplenews
In Drupal 10, version 4.0.0-beta1 is used and this option simply does not exist and the link returns a 404 page. It turns out that this link was inserted on other pages as well.
I tried testing the link in the content with some token, but I didn't find any module that supported tokens in the content pages themselves and this solution didn't work.
I think redirection should be present in this version too. Is there any solution to this issue?
Steps to reproduce
Install Drupal
Enable and configure Simplenews
Create some content with a link to your subscription management page: /newsletter/subscriptions
Save the page, click the link and... Does not display the correct page.
Proposed resolution
Create a link that can be made available throughout the site and that is capable of redirecting users to the correct page
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | simplenews.subscriptions-redirect.3408909-5.patch | 3.35 KB | adamps |
Comments
Comment #2
astutonetComment #3
adamps commentedOK I couldn't imagine any use for it, thanks for explaining. Yes we could put it back.
Comment #4
adamps commentedComment #5
adamps commentedIn v4 the routes have been adjusted so it will be /simplenews/subscriptions - see change record https://www.drupal.org/node/3379553
Comment #7
adamps commentedPlease can you let me know if it's working again?
Comment #8
astutonetHi @AdamPS. Thanks for your response.
I noticed that the patch in #5 was already included in version 4.0.0-rc1 of the Simplenews module, so I didn't need to apply the patch. All I had to do was update the module, do the tests, change the links according to new specifications and discover that everything is working!
Nice job!