Base URL missing in Jobs

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
aimeos
Administrator
Posts: 7858
Joined: 01 Jan 1970, 00:00

Re: Base URL missing in Jobs

Post by aimeos » 10 Sep 2021, 09:01

nvindice wrote: 09 Sep 2021, 14:22 Well, except for that the route enhancers are not used, and I can't figure out why. The generated link looks like:

Code: Select all

https://xyz.de/produkt/l?ai[currency]=EUR&ai[d_name]=My-product-name&ai[d_pos]=&ai[d_prodid]=113&ai[L]=de&ai[locale]=de&ai[site]=default&cHash=0895b1b3ded488b90c398c30e31ff6c1
- any idea what could be missing? Does it work out-of-the-box with Aimeos 2021.07 and Typo3 v10.4.20?
What do you mean? Why the route enhancers are not used for URLs generated by the scheduler?
aimeos wrote: 31 Aug 2021, 05:44 Correct me if I'm wrong, but isn't the idea behind content() to always create URLs that make sense? IMO, in a scheduler environment, there are very little scenarios where a relative image path would be useful. Again: does it work out-of-the-box in the e-mails or are there any (documented?) config settings which must be part of every working setup?
No, it doesn't work if you include images from the server in the e-mails and that's the reason they are not added to confirmation e-mails. In the frontend those relative URLs are absolutely correct but for the scheduler task there's room for enhancement. The problem is that it's not easy to get the absolute base URL there because the base URLs from the site configuration can contain a relative path for the language or other relative parts too.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

nvindice
Posts: 27
Joined: 16 May 2019, 16:20

Re: Base URL missing in Jobs

Post by nvindice » 10 Sep 2021, 09:12

aimeos wrote: 10 Sep 2021, 09:01 No, it doesn't work if you include images from the server in the e-mails and that's the reason they are not added to confirmation e-mails. In the frontend those relative URLs are absolutely correct but for the scheduler task there's room for enhancement. The problem is that it's not easy to get the absolute base URL there because the base URLs from the site configuration can contain a relative path for the language or other relative parts too.
Didn't think of that. I will try to solve it via the config entry you mentioned, thank you.
aimeos wrote: 10 Sep 2021, 09:01 What do you mean? Why the route enhancers are not used for URLs generated by the scheduler?
Exactly. It may not be very important, but I would like to get "clean" URLs even in the emails.

User avatar
aimeos
Administrator
Posts: 7858
Joined: 01 Jan 1970, 00:00

Re: Base URL missing in Jobs

Post by aimeos » 10 Sep 2021, 09:16

nvindice wrote: 10 Sep 2021, 09:12 Exactly. It may not be very important, but I would like to get "clean" URLs even in the emails.
If you find a solution deep down in the TYPO3 code why the route enhancers are not used in that case, please create a PR and we are happy the merge it :-)
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

nvindice
Posts: 27
Joined: 16 May 2019, 16:20

Re: Base URL missing in Jobs

Post by nvindice » 10 Sep 2021, 09:19

Oh boy :) Maybe I have some spare time to look for it. If I find a solution, I'll create a PR, as usual. Thank you for your fantastic support, btw!

User avatar
aimeos
Administrator
Posts: 7858
Joined: 01 Jan 1970, 00:00

Re: Base URL missing in Jobs

Post by aimeos » 10 Sep 2021, 09:20

Thanks a lot! :)
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

nvindice
Posts: 27
Joined: 16 May 2019, 16:20

Re: Base URL missing in Jobs

Post by nvindice » 15 Sep 2021, 14:05

Took a while but found the root cause - the Typo3 URL generator always chose the default route as the "action" parameter was missing.

Created a PR: https://github.com/aimeos/ai-typo3/pull/28

Post Reply