Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

external redirect will not be linked in template #21

Closed
fritzmg opened this issue Jan 8, 2018 · 1 comment
Closed

external redirect will not be linked in template #21

fritzmg opened this issue Jan 8, 2018 · 1 comment
Assignees
Labels
Milestone

Comments

@fritzmg
Copy link
Contributor

fritzmg commented Jan 8, 2018

Abridged reproduction:

  1. Create a new event.
  2. Set Redirect target to External URL.
  3. Set Link target to https://www.google.com/.
  4. Create an Event list module and set the Event template to event_teaser.
  5. Integrate the module somewhere in the front end.
  6. Open the front end.

The headline of the created event will not be linked. Also there will be no Read more… link. Thus you are unable to actually go the the external URL.

Tested with Contao 4.4.12. Same problem exists in Contao 3.5.31 probably.

Cause

This is caused by these lines:

// Show the teaser text of redirect events (see #6315)
if (\is_bool($event['details']))
{
    $objTemplate->hasDetails = false;
}

This is a problem for the event_teaser template, since it will only show links when hasDetails is true. The other templates like event_list or event_upcoming always create a link, regardless of hasDetails.

The current behaviour is inconsistent with the news module. In the news module, the headline is linked when it is an external redirect and the default news_latest template shows a Read more… link as well, when the news entry is an external redirect.

@leofeyer leofeyer added the bug label Jan 17, 2018
@leofeyer leofeyer added this to the 4.4.13 milestone Jan 17, 2018
@leofeyer leofeyer self-assigned this Jan 22, 2018
@leofeyer
Copy link
Member

Fixed in dab55ac.

@leofeyer leofeyer modified the milestones: 4.4.13, 4.4 May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants