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

Kalender: Eventliste Menü: Weiterleitungsseite #8140

Closed
mapfei opened this issue Dec 1, 2015 · 16 comments
Closed

Kalender: Eventliste Menü: Weiterleitungsseite #8140

mapfei opened this issue Dec 1, 2015 · 16 comments
Assignees
Labels
Milestone

Comments

@mapfei
Copy link

mapfei commented Dec 1, 2015

Die eingestellte Weiterleitungsseite wird (auch) in der Online-Demo beim Aufruf des entsprechenden Links nicht aufgerufen.

@fritzmg
Copy link
Contributor

fritzmg commented Dec 1, 2015

You should provide exact reproduction steps, not only one sentence.

@mapfei
Copy link
Author

mapfei commented Dec 1, 2015

Ich habe im Modul "Eventliste-Menü" eine Weiterleitungsseite definiert. Diese wird jedoch beim Aufruf des entsprechenden Links im Frontend nicht aufgerufen.

Beispiel: statt

veranstaltungen-archiv.html?year=2014

wird die Seite aufgerufen, auf dem das Modul eingebunden ist, jedoch mit dem entsprechenden Parameter ?year=2014.

@sonjaeh
Copy link

sonjaeh commented Dec 3, 2015

Kann diesen Fehler bestätigen. Siehe auch: #7953

@johannes-bittner
Copy link

Kann ich ebenfalls bestätigen.

@MaryLou1
Copy link

Kann das auch bestätigen. Fehler wie von mapfei beschrieben.

@leofeyer leofeyer added this to the 3.5.7 milestone Dec 15, 2015
@fritzmg
Copy link
Contributor

fritzmg commented Jan 2, 2016

Hm, it does work in the online demo though?

@fritzmg
Copy link
Contributor

fritzmg commented Jan 11, 2016

I found the bug.

The ModuleEventMenu generates its jumpTo URL in its generate() Method: ModuleEventMenu.php#L43 which is saved in the protected $strUrl variable of the Events class, which all Event modules inherit from.

However, immediately after parent::generate() is called of course, which executes ModuleCalendar::generate(). There $this->strUrl is overwritten with the current request string: ModuleCalendar.php#L70.

This bug was introduced in Contao 3.5.3. Previously the jumpTo URL was generated in each of the different compile… methods and thus $this->strUrl had the correct values.

As a workaround you could replace

return parent::generate();

with

$return = parent::generate();
if ($this->jumpTo && ($objTarget = $this->objModel->getRelated('jumpTo')) !== null)
{
    $this->strUrl = $this->generateFrontendUrl($objTarget->row());
}
return $return;

in ModuleEventMenu.php#L50

@fritzmg
Copy link
Contributor

fritzmg commented Jan 13, 2016

Sorry, had the wrong code in the workaround before, I have updated it now.

@weipah
Copy link

weipah commented Jan 19, 2016

@fritzmg this workaround does not work for me. I'm still stuck when I go to the reader-site once, the URL in the event-menu still will try to redirect to itself.
Before the update to 3.5.6 it was in working condition.

Has anyone else tested the workaround so far?

@sonjaeh
Copy link

sonjaeh commented Jan 19, 2016

I just replaced the ModuleEventMenu.php with the previous (3.5.4) one, which at least worked for me.
Update: 3.5.2 is the one that works - danke @fritzmg

@weipah
Copy link

weipah commented Jan 20, 2016

@sonjaeh are you sure it was version 3.5.4?
Because there is no difference in the file ModuleEventMenu.php between these versions.

@fritzmg
Copy link
Contributor

fritzmg commented Jan 20, 2016

The one from 3.5.2 should work. The bug was introduced in 3.5.3.

@weipah
Copy link

weipah commented Jan 20, 2016

@fritzmg stimmt, hab es grad getestet. Mit der Datei aus dieser Version funktioniert es wieder. Danke dir!

@fritzmg
Copy link
Contributor

fritzmg commented Jan 20, 2016

@leofeyer shouldn't this be hotfixed? This bug is around since over 4 months now basically.

@leofeyer
Copy link
Member

@fritzmg The ticket is already assigned to a bugfix branch.

@leofeyer
Copy link
Member

Fixed in cc9a170.

jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Mar 5, 2016
### 4.1.1 (2015-03-03)

 * Remove the "disable IP check" field from the back end settings (see #436).
 * Do not quote the search string in `FIND_IN_SET()` (see #424).
 * Always fix the domain and language when generating URLs (see contao/core#8238).
 * Fix two issues with the flexible back end theme (see contao/core#8227).
 * Correctly toggle custom page type icons (see contao/core#8236).
 * Correctly render the links in the monthly/yearly event list menu (see contao/core#8140).
 * Skip the registration related fields if a user is duplicated (see contao/core#8185).
 * Correctly show the form field type help text (see contao/core#8200).
 * Correctly create the initial version of a record (see contao/core#8141).
 * Correctly show the "expand preview" buttons (see contao/core#8146).
 * Correctly check that a password does not match the username (see contao/core#8209).
 * Check if a directory exists before executing `mkdir()` (see contao/core#8150).
 * Do not link to the maintenance module if the user cannot access it (see contao/core#8151).
 * Show the "new folder" button in the template manager (see contao/core#8138).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

7 participants