Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

An Event's imageUrl Field Overwrites It's Event Link #6468

Closed
beaniemonk opened this issue Nov 23, 2013 · 6 comments
Closed

An Event's imageUrl Field Overwrites It's Event Link #6468

beaniemonk opened this issue Nov 23, 2013 · 6 comments
Milestone

Comments

@beaniemonk
Copy link

You can reproduce this in the demo by adding an image to an event and entering a link target (I used http://www.google.com).

In addition to the image being linked, the event's actual redirect link ($this->href) is also changed to the image's link target as well.

@leofeyer
Copy link
Member

I cannot reproduce the issue. All the event links pointed correctly to the event reader page on my system. Only the image was linked to google.com.

@beaniemonk
Copy link
Author

Hi Leo,

I just tried it again on the online demo. I went into Music Academy Events, edited the "Winter Holiday" event by adding an image (picked a random one from site files). And entered "http://www.google.com" and the image link target.

Then I went to this front-end page:
http://demo.contao.org/en/events.html?month=201001

When I hover over any of the "Winter Holiday" events, all of the headlines are linked to Google.

I've attached a couple screenshots to (hopefully) prove I'm not crazy. :)

be
fe

@xchs
Copy link
Contributor

xchs commented Dec 4, 2013

I can reproduce the issue. Either way there is a problem with the whole event teaser image. Actually, it seems that the event teaser does not handle it properly.

@leofeyer
Copy link
Member

leofeyer commented Dec 5, 2013

Fixed in 08ea583. The image link is now stored as $this->imageHref and does not override $this->href (the event details URL) anymore.

@leofeyer leofeyer closed this as completed Dec 5, 2013
@aschempp
Copy link
Member

aschempp commented Dec 5, 2013

What about changing the href of events instead of changing the behavior of the universal function, which will eventually affect other modules?

@leofeyer
Copy link
Member

leofeyer commented Dec 5, 2013

Image links in events are very rare, so the change affects only very little installations. The core templates do not use teaser images at all, so the majority of users without customized templates are not affected either. This way the change only has a minimum impact.

And by the way, if there really were another module relying on the href property, its value would be overridden by the method as well, rendering the routine broken. But then we would have known much earlier, because this issue has been in the code for quite some time :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants