hakana VIP
Total posts: 425
23 Фев 2020 05:58

Hello Sergey,
When I try to add a new coupon, I get this error:
0 Too few arguments to function EmeraldControllerEmCoupon::allowAdd(), 0 passed in /home/zestco1/public_html/libraries/src/MVC/Controller/FormController.php on line 151 and exactly 1 expected.
And the coupon cannot be added.

Последние изменения: 07 Апр 2020


Sergey
Total posts: 13,748
02 Март 2020 08:29

Show me content of you components\com_emerald\controllers\emcoupon.php file.


hakana VIP
Total posts: 425
31 Март 2020 16:34
defined('_JEXEC') or die();

jimport('joomla.application.component.controllerform');

class EmeraldControllerEmCoupon extends JControllerForm
{
    public function allowEdit($data, $key)
    {
        return true;
    }

    public function allowAdd($data)
    {
        return true;
    }
}

Sergey
Total posts: 13,748
06 Апр 2020 07:56

Try to change it to

public function allowAdd($data = array())

hakana VIP
Total posts: 425
07 Апр 2020 21:24

Thank you very much, it worked :-)

Работает на Cobalt