1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

0 Cannot access empty property since update

Discussion in 'Community' started by Intelartifice, Jan 14, 2019 at 7:29 PM.

  1. Intelartifice

    Intelartifice New Member

    Level: Community
    Hi,
    I've several form on my site and all are good except one since update to Fabrik 3.9
    If I disable the email and redirect form plugin it's Ok
    But if enable one of these plugin I get 0 Cannot access empty property.
    Only on one form :( !!! And of course it's an important form...

    If some one an idea ?

    Joomla 3.9.1
    Fabrik 3.9 + lib 3.9
    PHP 7.0

    Regards,
    Jean-Marc
     
  2. troester

    troester Well-Known Member Staff Member

    Level: Community
    What are the settings of these plugins?
    Do you have custom code (e.g. email to, condition, attachement...)?
     
  3. Intelartifice

    Intelartifice New Member

    Level: Community
    Hi Troester,
    NO there is no condition, no attachement, no template article ....
    Only text with placeholder

    The error occurs even with a simple redirect to homepage ....
     
  4. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Can you set error reporting in Joomla to maximum and enable debug mode, and see if you get a more informative error message including the file name and line number.

    -- hugh
     
  5. Intelartifice

    Intelartifice New Member

    Level: Community
    Ok
    so, in list view :
    Warning: Division by zero in my path site root /form/plugins/fabrik_element/calc/calc.php(313) : eval()'d code on line 1

    in form/detail/add view :
    Warning: Division by zero in my path site root /form/plugins/fabrik_element/calc/calc.php(104) : eval()'d code on line 1

    Then on debug mode at the and of the page there is :
    SELECT b.id

    FROM l7w43_user_usergroup_map AS map

    LEFT JOIN l7w43_usergroups AS a
    ON a.id = map.group_id

    LEFT JOIN l7w43_usergroups AS b
    ON b.lft <= a.lft
    AND b.rgt >= a.rgt

    WHERE map.user_id = 524
    Explication
    id select_type table type possible_keys key key_len ref rows filtered Extra
    1 SIMPLE map ref PRIMARY PRIMARY 4 const 2 100.00 Using index
    1 SIMPLE a eq_ref PRIMARY PRIMARY 4 avis2sante_telemedicine_joomform.map.group_id 1 100.00 NULL
    1 SIMPLE b ALL idx_usergroup_nested_set_lookup INDEX N'A PU ÊTRE UTILISÉ NULL NULL 15 100.00 Range checked for each record (index map: 0x10)

    Thanks for helping
    Regards
    Jean-Marc
     
  6. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Well ...

    ... means you have an error in your code in a calc element, so first step is to fix that. You need to make sure whatever you are dividing by has a value. So, say you are using a placeholder to get the value of an element you will be dividing by ...

    Code (Text):

    $myValue = (int)'{yourtable___yourelement}';
    if ($myValue !== 0) {
      return $something / $myValue;
    }
    else {
      return 0;
    }
     
    -- hugh
     

Share This Page