jemproject / JEM-Project

JEM - an Event Manager for Joomla
https://www.joomlaeventmanager.net
GNU General Public License v3.0
25 stars 37 forks source link

4.0.0: you can book 0 places (like a ghost) #1625

Closed jojo12 closed 1 year ago

jojo12 commented 1 year ago

you can book 0 places even when min./user =1 that's wrong!

jojo12 commented 1 year ago

frontend works fine in backend I get an error: Es ist ein Fehler aufgetreten.

0 syntax error, unexpected identifier "COM_JEM_CLOSE", expecting ")" 

Call stack

| Function | Location

1 | () | JROOT\administrator\components\com_jem\views\attendee\tmpl\default.php:39 2 | Joomla\CMS\MVC\View\HtmlView->loadTemplate() | JROOT\libraries\src\MVC\View\HtmlView.php:203 3 | Joomla\CMS\MVC\View\HtmlView->display() | JROOT\administrator\components\com_jem\views\attendee\view.html.php:59 4 | JemViewAttendee->display() | JROOT\libraries\src\MVC\Controller\BaseController.php:645 5 | Joomla\CMS\MVC\Controller\BaseController->display() | JROOT\administrator\components\com_jem\controllers\attendees.php:191 6 | JemControllerAttendees->edit() | JROOT\libraries\src\MVC\Controller\BaseController.php:678 7 | Joomla\CMS\MVC\Controller\BaseController->execute() | JROOT\administrator\components\com_jem\jem.php:54 8 | require_once() | JROOT\libraries\src\Dispatcher\LegacyComponentDispatcher.php:71 9 | Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher{closure}() | JROOT\libraries\src\Dispatcher\LegacyComponentDispatcher.php:73 10 | Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() | JROOT\libraries\src\Component\ComponentHelper.php:361 11 | Joomla\CMS\Component\ComponentHelper::renderComponent() | JROOT\libraries\src\Application\AdministratorApplication.php:143 12 | Joomla\CMS\Application\AdministratorApplication->dispatch() | JROOT\libraries\src\Application\AdministratorApplication.php:186 13 | Joomla\CMS\Application\AdministratorApplication->doExecute() | JROOT\libraries\src\Application\CMSApplication.php:293 14 | Joomla\CMS\Application\CMSApplication->execute() | JROOT\administrator\includes\app.php:61 15 | require_once() | JROOT\administrator\index.php:32

change line 39 back to ` 'footer' => ''

then backend works too! `

Heklaterriol commented 1 year ago

Ops, thank you, there was an old wrong language strong embedding. It is fixed an commited.

mckillo commented 1 year ago

Thanks Hekla, for me is fixed too. JEM4 invited user - minimum number Only one details of design, what is the minimum number? Now, it's min=1 or should be min= $this->row->minbookeduser? If minbookeduser =2, in this case for invited user, the number should be the same of other registered users, I mean, 2.

For it, you can update lines 129-130 into \administrator\components\com_jem\views\attendee\tmpl\default.php:

<input type="number" name="places" id="places" class="form-control inputbox" min="<?php echo $this->row->minbookeduser;?>" max="<?php echo $this->row->maxbookeduser;?>"
                           value="<?php echo !empty($this->row->places) ? $this->row->places : '1'; ?>"

If you prefer the option min=1, then the issue can be closed. What do you think?

mckillo commented 1 year ago

One reflexion about minimum number of invited user. If the number is 1 the admin send email to this invited user with 1 booked or minimum booked user places. But if we return to 0 (minimum value), the admin sends email to notification to the user of this event without any booked places. In this case, it's notification of registration link of event to the user by email (only, this user isn't registered for this event in the database). I don't know if JEM 2.x was designed so, but it's a possibility of use. What do you think?

Heklaterriol commented 1 year ago

Only one details of design, what is the minimum number? Now, it's min=1 or should be min= $this->row->minbookeduser? If minbookeduser =2, in this case for invited user, the number should be the same of other registered users, I mean, 2.

Thanks McKillo, it is commited.

jojo12 commented 1 year ago

it's not true: problem persists! in dev2