verbb / events

Craft CMS Plugin for events management and ticketing.
Other
22 stars 13 forks source link

Wrong URLs behind 'New event' Button on non-primary sites. #148

Closed scholejo closed 4 months ago

scholejo commented 5 months ago

Describe the bug

In our multisite-setup, the 'New event' button only works when on the primary site. On other sites we get a 404 error. I figured out that the links behind the button seem to get an unnecessary site handle attached to their end. This results in URIs like admin/events/events/<event-type>/new/de_DE?site=de_DE. It looks to me that the whole if-statement in the _getEventTypeTriggerHref function in the _event_index.js is unnecessary: https://github.com/verbb/events/blob/craft-4/src/resources/src/js/_event-index.js#L154-L160, maybe because of a recent Craft Update.

Steps to reproduce

  1. On a multisite, go to the events index page
  2. Swtich to any non-primary site
  3. Click the 'New event' button
  4. You should see Craft's 404 page

Craft CMS version

4.9.5

Plugin version

2.0.5

Multi-site?

Yes

Additional context

No response

engram-design commented 5 months ago

Fixed for the next release. To get this early, run composer require verbb/events:"dev-craft-4 as 2.0.5".

scholejo commented 5 months ago

That works for me. Thank you for the quick fix!

engram-design commented 4 months ago

Fixed in 2.0.6