Error printed on Customer EMAILS

  • Posts: 77
  • Thank you received: 3
9 years 7 months ago #197115

-- HikaShop version -- : HikaShop Business 2.4.0
-- Joomla version -- : 3.4.0
-- Error-message(debug-mod must be tuned on) -- : ONly see on email
Notice: Use of undefined constant JPATH_COMPONENT - assumed 'JPATH_COMPONENT' in /home/WEBSITE/libraries/legacy/view/legacy.php on line 164

Getting error in order emails sent to CUSTOMER.
The admin email seems fine. Any info on this ? thank you


Notice: Use of undefined constant JPATH_COMPONENT - assumed 'JPATH_COMPONENT' in /home/WEBSITE/libraries/legacy/view/legacy.php on line 164

Please Log in or Create an account to join the conversation.

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
9 years 7 months ago #197121

Hi,

I don't know why you get that error but it comes from the Joomla code...
Turn off the "error reporting" option of the Joomla configuration and you won't get that error in your emails.

Please Log in or Create an account to join the conversation.

  • Posts: 2
  • Thank you received: 0
9 years 6 months ago #202578

hi !

i have the same error ONLY with the confirmation email :

Notice: Use of undefined constant JPATH_COMPONENT - assumed 'JPATH_COMPONENT' in /home/ecibat/www/2015/libraries/legacy/view/legacy.php on line 166


i have tried this :

Turn off the "error reporting" option of the Joomla configuration and you won't get that error in your emails.


but the message is still there in the email.

thanks for helping me.

Thomas

Please Log in or Create an account to join the conversation.

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
9 years 6 months ago #202580

Hi,

Then edit the file libraries/legacy/view/legacy.php and add a

if(defined('JPATH_COMPONENT '))
just before that line 166 of that file and that should avoid the issue.

Please Log in or Create an account to join the conversation.

  • Posts: 2
  • Thank you received: 0
9 years 5 months ago #203211

it works,

thanks !

Please Log in or Create an account to join the conversation.

  • Posts: 8
  • Thank you received: 0
9 years 3 months ago #210506

Hello,
I've the same issue but on line 164.
Line 164 is :
elseif (is_dir(JPATH_COMPONENT . '/view'))

Error in mail is :
Notice: Use of undefined constant JPATH_COMPONENT - assumed 'JPATH_COMPONENT' in /usr/share/nginx/www/felineshop/www.felineshop.ch/libraries/legacy/view/legacy.php on line 164

Joomla version : 3.4.3.
HikaShop version : 2.5.0

What çan I do ?

Best regards,
Philippe

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 3 months ago #210567

Hi,

You can see to modify the line in order to add some checks to verity that the constant exists.
Otherwise, you can do what Nicolas first recommended : to deactivate the display of these warning, in your Joomla global configuration (or in your php.ini).
If you set the "error reporting level" to "none" ; you won't display anymore the PHP error messages, like it should be on all production websites.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 195
  • Thank you received: 13
  • Hikashop Business
8 years 9 months ago #230399

We are also getting this error now in the customer's 'confirmed' email after upgrading to Hikashop 2.6.1.

Notice: Use of undefined constant JPATH_COMPONENT - assumed 'JPATH_COMPONENT' in /home/client_site/public_html/libraries/legacy/view/legacy.php on line 164

Our global error reporting is already set to 'none', and I'd rather not modify a core Joomla php file to hide the error. The error doesn't appear in any of the other emails, only the customer's Order status notification email.


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters

Please Log in or Create an account to join the conversation.

  • Posts: 195
  • Thank you received: 13
  • Hikashop Business
8 years 9 months ago #230419

As a temporary solution we did try the modification to legacy.php that Nicolas suggested, but unfortunately, even after that we are still seeing the error in the 'order confirmed' emails.

As an alternate temp solution I've changed line 164 to:

elseif (defined('JPATH_COMPONENT ') && is_dir(JPATH_COMPONENT . '/view'))

We'll see if that works for now ...


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters
Last edit: 8 years 9 months ago by 3by400.

Please Log in or Create an account to join the conversation.

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
8 years 9 months ago #230443

Hi,

If you still see the error even though you set the "error reporting" to none in the Joomla configuration, then it means that your server is configured to override the setting.
You can try instead to turn off the error_reporting setting of the php.ini of your server.
www.phpknowhow.com/configuration/php-ini-error-settings/

Please Log in or Create an account to join the conversation.

Time to create page: 0.083 seconds
Powered by Kunena Forum