ColdTrick / event_manager

Manage events in Elgg
https://elgg.org/plugins/736695
27 stars 37 forks source link

Fatal Error on Saving Events #184

Closed rohit1290 closed 1 year ago

rohit1290 commented 1 year ago

Elgg version Which version of Elgg are you using: v5.0.0

Plugin version Which version of the plugin are you using: v17.0

Plugin source

Describe the bug Getting the following fatal error when creating an event. ELGG.CRITICAL: Exception at time 1686503884:\nElggRiverItem::getView(): Return value must be of type string, null returned\n {"backtrace":[],"process_id":318575,"memory_peak_usage":"26 MB","memory_usage":"26 MB","url":"/elgg5/action/event_manager/event/edit","ip":"::1","http_method":"POST","server":"localhost","referrer":"http://localhost/elgg5/event/add/40","unique_id":"ZIYByvGLeQwtaR5qnmvdSAAAAAQ"}\n, referer: http://localhost/elgg5/event/add/40

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Event Manager' home page
  2. Click on 'New Event'
  3. Fill in the details and click submit
  4. See error
rohit1290 commented 1 year ago

Solution: It seems like view line is missing: https://github.com/ColdTrick/event_manager/blob/3fc8d42a34c2fcc9032760b1d3c7760b2262d03d/actions/event_manager/event/edit.php#LL91C4-L91C15

Add 'view' => 'river/event_relationship/create',

jdalsem commented 1 year ago

Thanks for reporting. The cause is a special case in core that needed to be fixed. The fix is here: https://github.com/Elgg/Elgg/pull/14375