Error when posting contest entries

9 months 4 days ago #1545
Topic Author
Marc Bills's Avatar
Posts: 14
Error when posting contest entries

Hi there,

When I try to post competition entries, I get the following message:
Too few arguments to function PlgCompetitionEstream::onParticipantAfterSave(), 3 passed in ..../libraries/joomla/event/event.php on line 70 and exactly 4 expected.

how do I resolve this?

I am using NorrCompetitions with the EasySocial add-ons

Regards
Kiwimaster

The topic has been locked.
9 months 4 days ago #1546
Dmitry's Avatar
Posts: 532
Error when posting contest entries

Hello.

Please explain step by step to reproduce.

Best regards,
Dmitry


Like our extensions and support?
Add your voice to the JED listing with a 100-score review: bit.ly/2ciJBqC
Thanks!
The topic has been locked.
9 months 4 days ago #1547
Dmitry's Avatar
Posts: 532
Error when posting contest entries

Ok, the possible fix. Open components/com_competition/models/appform.php and change this line:

$result = $dispatcher->trigger('onParticipantAfterSave', array($this->context, $participantTable, $isNew));
to
$result = $dispatcher->trigger('onParticipantAfterSave', array($this->context, $participantTable, $isNew, $data));

Hope it will help :)

Dmitry


Like our extensions and support?
Add your voice to the JED listing with a 100-score review: bit.ly/2ciJBqC
Thanks!
The topic has been locked.
9 months 3 days ago #1548
Dmitry's Avatar
Posts: 532
Error when posting contest entries

Hello!

Did it help?

Dmitry


Like our extensions and support?
Add your voice to the JED listing with a 100-score review: bit.ly/2ciJBqC
Thanks!
The topic has been locked.
9 months 3 days ago #1550
Topic Author
Marc Bills's Avatar
Posts: 14
Error when posting contest entries

yes.
Thank you.....adding the extra $data bit at the end of line 571 seems to have sorted out the problem
(Note that on line 571, the place where onParticipantAfterSave is found in appform, starts with $dispatcher and not $results = $dispatcher)

The topic has been locked.
9 months 3 days ago #1551
Dmitry's Avatar
Posts: 532
Error when posting contest entries

Thank you for feedback. Will include this fix in our next version.

(Note that on line 571, the place where onParticipantAfterSave is found in appform, starts with $dispatcher and not $results = $dispatcher)
Oops, wrong copy paste from another event code :pinch: :whistle: It should be
$dispatcher->trigger('onParticipantAfterSave', array($this->context, $participantTable, $isNew, $data));

Dmitry


Like our extensions and support?
Add your voice to the JED listing with a 100-score review: bit.ly/2ciJBqC
Thanks!
Last edit: 9 months 3 days ago by Dmitry.
The topic has been locked.

You can get our help: Monday - Friday / 09:00 to 17:00 (GMT+2). but not limited. Our staff will be pleased to provide Premium support to every paid subscriber asap, but sometimes you should be ready to wait for our reply for up to 3 days. In case of free extensions we do the best to develop and maintain them either, but their support is not necessary.

Product Latest Update