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!
nvindice
Posts: 27
Joined: 16 May 2019, 16:20

Base URL missing in Jobs

Post by nvindice » 25 Aug 2021, 16:44

Hi, the content() view helper does not generate absolute URLs in the e-mail job. Site configuration is enabled and the Typo3 base URL in the site configuration is set. Am I missing something?

Typo3 10.4.20
Aimeos 2021.07

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

Re: Base URL missing in Jobs

Post by aimeos » 26 Aug 2021, 05:47

Which job controller do you execute?
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 » 26 Aug 2021, 08:50

The Aimeos advanced scheduler...

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

Re: Base URL missing in Jobs

Post by aimeos » 26 Aug 2021, 09:46

The name of the scheduler task isn't which job controllers you have selected in the task. Each task can execute one or more job controllers.
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 » 26 Aug 2021, 10:07

Sorry, I thought you were asking for the scheduler type.

The job is "Order delivery related emails".

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

Re: Base URL missing in Jobs

Post by nvindice » 26 Aug 2021, 16:03

...I also noticed that the links which are generated via the url() view helper are not SEO friendly, but with all ai[] parameters visible. Any clue?

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

Re: Base URL missing in Jobs

Post by aimeos » 26 Aug 2021, 16:30

Did you forget to enter the correct page IDs in the input fields of the scheduler task?
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 » 27 Aug 2021, 07:26

Nope, all set. Only " Product catalog page ID" input field is emptied every time I save the settings, close and re-open the settings, but this should not be the problem here.

The product links are generated properly (meaning they work, all parameters are set and they are absolute URLs), but they are not SEO-friendly.

The product image paths are not absolute, although we use the content() view helper (which should generate absolute URLs in Typo3 scheduler environment AFAIK).

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

Re: Base URL missing in Jobs

Post by aimeos » 31 Aug 2021, 05:44

nvindice wrote: 27 Aug 2021, 07:26 The product links are generated properly (meaning they work, all parameters are set and they are absolute URLs), but they are not SEO-friendly.
The URLs are generated by the TYPO3 Router which uses your site configuration including the rules you add for the route enhancers:
- https://aimeos.org/docs/latest/typo3/setup/#seo-urls
- https://github.com/aimeos/aimeos-typo3/ ... #L141-L151
nvindice wrote: 27 Aug 2021, 07:26 The product image paths are not absolute, although we use the content() view helper (which should generate absolute URLs in Typo3 scheduler environment AFAIK).
The content() view helper uses this base URL, which is relative by default:
https://github.com/aimeos/aimeos-typo3/ ... ce.php#L23

If you use an absolute URL there, the image paths will be absolute 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 » 09 Sep 2021, 14:22

aimeos wrote: 31 Aug 2021, 05:44 The URLs are generated by the TYPO3 Router which uses your site configuration including the rules you add for the route enhancers:
- https://aimeos.org/docs/latest/typo3/setup/#seo-urls
- https://github.com/aimeos/aimeos-typo3/ ... #L141-L151
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?

aimeos wrote: 31 Aug 2021, 05:44 The content() view helper uses this base URL, which is relative by default:
https://github.com/aimeos/aimeos-typo3/ ... ce.php#L23

If you use an absolute URL there, the image paths will be absolute too.
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?

Post Reply