hofff / contao-social-tags

GNU Lesser General Public License v3.0
2 stars 5 forks source link

Fix URL generation for faq, news & events #6

Closed fritzmg closed 4 years ago

fritzmg commented 4 years ago

Currently the URL generated for faq, news and events is not necessarily an absolute URL, since News::generateNewsUrl uses getFrontendUrl and not getAbsoluteUrl - and getFrontendUrl only returns an absolute URL, if the current domain differs from the generated domain.

This PR prepends the scheme and host if the generated URL is not absolute.

dmolineus commented 4 years ago

Ah, I see that feature to force an absolute url was added in Contao 4.5 and is not available in Contao 4.4.

fritzmg commented 4 years ago

As discussed in Slack I have updated the PR, adding a static function to generate the FAQ url, similar to how the other functions work.

dmolineus commented 4 years ago

Thanks @fritzmg