aimeos / ai-typo3

TYPO3 adapter for Aimeos web shops and e-commerce solutions
https://aimeos.org/TYPO3
GNU Lesser General Public License v3.0
72 stars 6 forks source link

Cancelling subscription buttons are broken in 2024.10 #33

Open Physikbuddha opened 16 hours ago

Physikbuddha commented 16 hours ago

In Aimeos 2024.07 it was possible to click the Cancel button in the subscriptions overview plugin to stop renewing an active running subscription. This feature does not work anymore - at least out of the box without any further configuration. The cancel button is generated with an empty href and will only reload the subscription overview page on click.

This is caused by a changed link generation behaviour in https://github.com/aimeos/ai-typo3/commit/269272c31796b63970174b2a2fe8b994df82d1e1 where the page uid passed to the UriBuilder does not fall back to $GLOBALS['TSFE']->id anymore. (Breaking change?)

The link to the cancel button is generated by calling $this->link('client/html/account/subscription/url');. The sub config key client/html/account/subscription/url/target is not set by default, so null is passed into the UriBuilder as target page uid. Before, it would fall back to the current page, generating a valid cancellation link.

Now, I am required to explicitly configure the target page uid. This might also be the case in other frontend plugins that I am not yet aware of.

aimeos commented 15 hours ago

The TYPO3 core maintainers discourage using $GLOBALS['TSFE'] as they want to remove all global variables in the future, so this was the reason for removing $GLOBALS['TSFE']->id fallback. On the other hand, editors shouldn't be forced to configure the same page in the flexform of the plugin.

We've tried now set the current page ID differently:

The changes are also available for 2024.10.x-dev. Can you check if that works?