VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: nordmograph on April 26, 2017, 11:45:50 AM

Title: VM3.2.1: Loads of Warning & Notices showing although error reporting off
Post by: nordmograph on April 26, 2017, 11:45:50 AM
Hello

Is there a new error reporting switch I missed ??
On product details page, when product is free I get
Notice: Undefined index: salesPriceTt in /home/xxx/public_html/extensions/administrator/components/com_virtuemart/helpers/currencydisplay.php on line 267
Notice: Undefined index: priceWithoutTaxTt in /home/xxx/public_html/extensions/administrator/components/com_virtuemart/helpers/currencydisplay.php on line 267
Notice: Undefined index: discountAmountTt in /home/xxx/public_html/extensions/administrator/components/com_virtuemart/helpers/currencydisplay.php on line 267
Notice: Undefined index: taxAmountTt in /home/xxx/public_html/extensions/administrator/components/com_virtuemart/helpers/currencydisplay.php on line 267


Also on order details (Frontend)

Warning: Illegal string offset 'relative' in /home/xxx/public_html/extensions/libraries/cms/html/html.php on line 620
Warning: Illegal string offset 'pathOnly' in /home/xxx/public_html/extensions/libraries/cms/html/html.php on line 621
Warning: Illegal string offset 'detectBrowser' in /home/xxx/public_html/extensions/libraries/cms/html/html.php on line 622
Warning: Illegal string offset 'detectDebug' in /home/xxx/public_html/extensions/libraries/cms/html/html.php on line 623
Warning: Illegal string offset 'relative' in /home/xxx/public_html/extensions/libraries/cms/html/html.php on line 626
Warning: Illegal string offset 'detectBrowser' in /home/xxx/public_html/extensions/libraries/cms/html/html.php on line 626
Warning: Illegal string offset 'detectDebug' in /home/xxx/public_html/extensions/libraries/cms/html/html.php on line 626
Warning: Illegal string offset 'pathOnly' in /home/xxx/public_html/extensions/libraries/cms/html/html.php on line 629

Is there a new switch I miseed ?

I need these off quick !

Thanks for your help

Joomla 3.7 - VM3.2.1 - PHP7
Title: Re: VM3.2.1: Loads of Warning & Notices showing although error reporting off
Post by: GJC Web Design on April 26, 2017, 11:55:52 AM
try
error_reporting( E_ERROR | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING );

in the Joomla root index.php
Title: Re: VM3.2.1: Loads of Warning & Notices showing although error reporting off
Post by: welrachid on May 02, 2017, 22:47:52 PM
That wont help. Tried it - no luck.
unfortunately i was only able to remove these erros by doing as described here:
https://forum.virtuemart.net/index.php?topic=137361.0

i hate to hack core files, but this i had to until VM somehow fixes the error.
Title: Re: VM3.2.1: Loads of Warning & Notices showing although error reporting off
Post by: GJC Web Design on May 02, 2017, 22:57:36 PM
QuoteWarning: Illegal string offset 'relative' in /home/xxx/public_html/extensions/libraries/cms/html/html.php on line 620
Warning: Illegal string offset 'pathOnly' in /home/xxx/public_html/extensions/libraries/cms/html/html.php on line 621
Warning: Illegal string offset 'detectBrowser' in /home/xxx/public_html/extensions/libraries/cms/html/html.php on line 622
Warning: Illegal string offset 'detectDebug' in /home/xxx/public_html/extensions/libraries/cms/html/html.php on line 623
Warning: Illegal string offset 'relative' in /home/xxx/public_html/extensions/libraries/cms/html/html.php on line 626
Warning: Illegal string offset 'detectBrowser' in /home/xxx/public_html/extensions/libraries/cms/html/html.php on line 626
Warning: Illegal string offset 'detectDebug' in /home/xxx/public_html/extensions/libraries/cms/html/html.php on line 626
Warning: Illegal string offset 'pathOnly' in /home/xxx/public_html/extensions/libraries/cms/html/html.php on line 629

these come from VM template files that use JHtml::stylesheet ()

e.g. in components\com_virtuemart\views\user\tmpl\edit_address.php  line 23

e.g.  JHtml::stylesheet ('vmpanels.css', JURI::root () . 'components/com_virtuemart/assets/css/');

replace with

$url= JURI::root () . 'components/com_virtuemart/assets/css/vmpanels.css';
      $document = JFactory::getDocument();
   $document->addStyleSheet($url);
Title: Re: VM3.2.1: Loads of Warning & Notices showing although error reporting off
Post by: Milbo on May 03, 2017, 08:57:34 AM
Heavens, GJC, please use vm

vmJsApi::css('vmpanels');
So the answer is just to remove the old shit and use our standard stuff
Title: Re: VM3.2.1: Loads of Warning & Notices showing although error reporting off
Post by: Milbo on May 03, 2017, 11:43:54 AM
Quote from: nordmograph on April 26, 2017, 11:45:50 AM
Notice: Undefined index: salesPriceTt in /home/xxx/public_html/extensions/administrator/components/com_virtuemart/helpers/currencydisplay.php on line 267
Notice: Undefined index: priceWithoutTaxTt in /home/xxx/public_html/extensions/administrator/components/com_virtuemart/helpers/currencydisplay.php on line 267
Notice: Undefined index: discountAmountTt in /home/xxx/public_html/extensions/administrator/components/com_virtuemart/helpers/currencydisplay.php on line 267
Notice: Undefined index: taxAmountTt in /home/xxx/public_html/extensions/administrator/components/com_virtuemart/helpers/currencydisplay.php on line 267

Another one has

Quote from: welrachid on April 28, 2017, 11:55:12 AM
And my error logs show this:
PHP Notice:  Undefined index: priceWithoutTaxTt in ..../administrator/components/com_virtuemart/helpers/currencydisplay.php on line 323
PHP Notice:  Undefined index: discountAmountTt in ..../administrator/components/com_virtuemart/helpers/currencydisplay.php on line 323
PHP Notice:  Undefined index: taxAmountTt in ..../administrator/components/com_virtuemart/helpers/currencydisplay.php on line 323
PHP Notice:  Undefined index: salesPriceTt in ..../administrator/components/com_virtuemart/helpers/currencydisplay.php on line 323

I changed now in line 321


if(is_array($product_price){


to


if(is_array($product_price)){
if(isset($product_price[$name])){
$price = $product_price[$name] ;
} else {
return '';
}
} else {
$price = $product_price;
}
Title: Re: VM3.2.1: Loads of Warning & Notices showing although error reporting off
Post by: Uglystick on May 10, 2017, 00:18:30 AM
Hi, I have the same error, and shows in my invoices...

Warning: Illegal string offset 'relative' in /home/xxxx/public_html/ebonyoutlet.co.nz/libraries/cms/html/html.php on line
620
Warning: Illegal string offset 'pathOnly' in /home/xxxx/public_html/ebonyoutlet.co.nz/libraries/cms/html/html.php on
line 621
Warning: Illegal string offset 'detectBrowser' in /home/xxxx/public_html/ebonyoutlet.co.nz/libraries/cms/html/html.php
on line 622
Warning: Illegal string offset 'detectDebug' in /home/xxxx/public_html/ebonyoutlet.co.nz/libraries/cms/html/html.php
on line 623
Warning: Illegal string offset 'relative' in /home/xxxx/public_html/ebonyoutlet.co.nz/libraries/cms/html/html.php on line
626
Warning: Illegal string offset 'detectBrowser' in /home/xxxx/public_html/ebonyoutlet.co.nz/libraries/cms/html/html.php
on line 626
Warning: Illegal string offset 'detectDebug' in /home/xxxx/public_html/ebonyoutlet.co.nz/libraries/cms/html/html.php
on line 626
Warning: Illegal string offset 'pathOnly' in /home/xxxx/public_html/ebonyoutlet.co.nz/libraries/cms/html/html.php on
line 629

I have no hard hacks, this has only appeared after installing com_virtuemart.3.2.1_ext_aio file  :'(

Title: Re: VM3.2.1: Loads of Warning & Notices showing although error reporting off
Post by: GJC Web Design on May 10, 2017, 11:26:01 AM
http://forum.virtuemart.net/index.php?topic=137327.msg480890#msg480890

and from Milbo

your template
Title: Re: VM3.2.1: Loads of Warning & Notices showing although error reporting off
Post by: Uglystick on May 12, 2017, 01:42:16 AM
Ok, sorry I'm still learning,

So I replace the whole of Line 23 in components\com_virtuemart\views\user\tmpl\edit_address.php?

JHtml::stylesheet ('vmpanels.css', JURI::root () . 'components/com_virtuemart/assets/css/');

with

$url= JURI::root () . 'components/com_virtuemart/assets/css/vmpanels.css';
      $document = JFactory::getDocument();
   $document->addStyleSheet($url);

Or just from the JURI::root () like below?

JHtml::stylesheet ('vmpanels.css', JURI::root () . 'components/com_virtuemart/assets/css/vmpanels.css';
      $document = JFactory::getDocument();
   $document->addStyleSheet($url);
Title: Re: VM3.2.1: Loads of Warning & Notices showing although error reporting off
Post by: GJC Web Design on May 12, 2017, 11:17:06 AM
just replace

JHtml::stylesheet ('vmpanels.css', JURI::root () . 'components/com_virtuemart/assets/css/');

with

vmJsApi::css('vmpanels');
Title: Re: VM3.2.1: Loads of Warning & Notices showing although error reporting off
Post by: Milbo on May 15, 2017, 12:01:06 PM
vm3.2.2 should also help http://dev.virtuemart.net/projects/virtuemart/files
Title: Re: VM3.2.1: Loads of Warning & Notices showing although error reporting off
Post by: Uglystick on May 15, 2017, 22:35:22 PM
Awesome. Thanks for your help! :D
Title: Re: VM3.2.1: Loads of Warning & Notices showing although error reporting off
Post by: nordmograph on May 15, 2017, 22:37:16 PM
Thanks Milbo
Title: Re: VM3.2.1: Loads of Warning & Notices showing although error reporting off
Post by: Tentaurus on May 16, 2017, 13:41:29 PM
...I get these warnings not in the FE but in the BE of a component (Wawi connector)!
In this case the VM template can't be the issue?!

Warnings disappears when I switch off error reporting!
PHP settings are display_errors = On

Thanks for a hint!
Matthias

Title: Re: VM3.2.1: Loads of Warning & Notices showing although error reporting off
Post by: GJC Web Design on May 16, 2017, 14:29:31 PM
if they are the same errors find what is calling  ->  JHtml::stylesheet ()
Title: Re: VM3.2.1: Loads of Warning & Notices showing although error reporting off
Post by: ukfish1 on May 25, 2017, 15:34:56 PM
Hi

I'm using VM 3.2.2 and Joomla 3.7.2 and getting the same errors

the code on line 23 in components\com_virtuemart\views\user\tmpl\edit_address.php is slightly different to that mentioned earlier in this thread. What needs replacing in this version of VM please?

Thanks

Paul
Title: Re: VM3.2.1: Loads of Warning & Notices showing although error reporting off
Post by: Milbo on May 25, 2017, 22:31:45 PM
It is your layout override. You need to adjust it.
Title: Re: VM3.2.1: Loads of Warning & Notices showing although error reporting off
Post by: GJC Web Design on May 25, 2017, 22:49:28 PM
just replace the line containing the addStyleSheet() function

with

vmJsApi::css('vmpanels');
Title: Re: VM3.2.1: Loads of Warning & Notices showing although error reporting off
Post by: Matejko on July 09, 2017, 19:50:22 PM
Hi, I have the same problem ... after joomla fell after updating the VM3 extensions, I have a few problems ... In the customer registration (https://foxylady.sk/index.php/sample-sites/editaddresscartBT) the error warnings: 
Warning: Illegal string offset 'relative' in /home/jc016400/foxylady_eshop/libraries/cms/html/html.php on line 620

In the Line 23 is already this: vmJsApi::css('vmpanels'); so where is the problem?


Also it does not work Rewriting some untranslated phrases in Extensions - Languages - Rewriting ... when I type the search value, searching froze and I get this message: Error while executing the ajax request.

I'll be grateful for every advice ...

PHP 5.5.13 Joomla 3.7.3 VM 3.2.2
Title: Re: VM3.2.1: Loads of Warning & Notices showing although error reporting off
Post by: Matejko on July 12, 2017, 16:04:51 PM
So the solution follows:
You must change not only the code on line 23 in components\com_virtuemart\views\user\tmpl\edit_address.php, but also in the template .../templates/.../html/com_virtuemart/user/edit_address.php
Title: Re: VM3.2.1: Loads of Warning & Notices showing although error reporting off
Post by: Milbo on July 13, 2017, 07:36:56 AM
Quote from: Matejko on July 12, 2017, 16:04:51 PM
So the solution follows:
You must change not only the code on line 23 in components\com_virtuemart\views\user\tmpl\edit_address.php, but also in the template .../templates/.../html/com_virtuemart/user/edit_address.php

Right and wrong. You must ONLY change the layout in your template. This is what we call an override. The core file should remain original. If you rely on modified core files, you have always trouble updating.

So this
Quote from: Matejko on July 12, 2017, 16:04:51 PM
.../templates/.../html/com_virtuemart/user/edit_address.php

Disables this
Quote from: Matejko on July 12, 2017, 16:04:51 PM
components\com_virtuemart\views\user\tmpl\edit_address.php
Title: Re: VM3.2.1: Loads of Warning & Notices showing although error reporting off
Post by: Matejko on July 15, 2017, 15:39:57 PM
I didn´t change in the core file anything, only in template ... Every advice before was about this file - components\com_virtuemart\views\user\tmpl\edit_address.php and as you write, it´s not the file ...
I must say, that this all, all problems I still have after the updates VM extension, isn´t our fall or stupidity. I worked on my web 3 months and after this stupid updates I have always new and new problem, I must pay for advice, because I´m self-taught person and I´m not IT. So, thanks for all developers VM.
Title: Re: VM3.2.1: Loads of Warning & Notices showing although error reporting off
Post by: jenkinhill on July 15, 2017, 15:47:58 PM
I think you use the Elise template. This was apparently updated about 10 days ago to work with current VM versions. I found this update as I was asked to help fix a site using another template from the same template supplier. Their issue was different, though.
Title: VirtueMart 3.2.4: Warning: Illegal string offset
Post by: rafser on November 07, 2017, 15:03:14 PM
Hello everyone

I'm new with VM and in php.

I'm using Joomla! 3.8.1 and VirtueMart 3.2.4

And I get the following error, could you please help me in a simple way explaining what file and code must be edited and what to replace?
I truly appreciate any help, thank you so much.
Bet regards

https://...com/component/virtuemart/user/editaddresscartBT?Itemid=0

Warning: Illegal string offset 'relative' in /user/home/public_html/site.com/1/libraries/src/HTML/HTMLHelper.php on line 626
Warning: Illegal string offset 'pathOnly' in /user/home/public_html/site.com/1/libraries/src/HTML/HTMLHelper.php on line 627
Warning: Illegal string offset 'detectBrowser' in /home/rafser/public_html/site.com1/libraries/src/HTML/HTMLHelper.php on line 628
Warning: Illegal string offset 'detectDebug' in /user/home/public_html/msite.com/1/libraries/src/HTML/HTMLHelper.php on line 629
Warning: Illegal string offset 'relative' in /user/home/public_html/site.com/1/libraries/src/HTML/HTMLHelper.php on line 632
Warning: Illegal string offset 'detectBrowser' in /home/rafser/public_html/site.com/1/libraries/src/HTML/HTMLHelper.php on line 632
Warning: Illegal string offset 'detectDebug' in /home/rafser/public_html/site.com/1/libraries/src/HTML/HTMLHelper.php on line 632
Warning: Illegal string offset 'pathOnly' in /user/home/public_html/msite.com/1/libraries/src/HTML/HTMLHelper.php on line 635

HTMLHelper.php : 626-635 ???
------------------------------------------------------------------------------------------------------------------------------------------------------
         $options['relative']      = isset($options['relative']) ? $options['relative'] : false;
         $options['pathOnly']      = isset($options['pathOnly']) ? $options['pathOnly'] : false;
         $options['detectBrowser'] = isset($options['detectBrowser']) ? $options['detectBrowser'] : true;
         $options['detectDebug']   = isset($options['detectDebug']) ? $options['detectDebug'] : true;
      }

      $includes = static::includeRelativeFiles('css', $file, $options['relative'], $options['detectBrowser'], $options['detectDebug']);

      // If only path is required
      if ($options['pathOnly'])
------------------------------------------------------------------------------------------------------------------------------------------------------
Title: Re: VM3.2.1: Loads of Warning & Notices showing although error reporting off
Post by: Jörgen on November 07, 2017, 15:24:41 PM
Hello

Please don´t cross post.

This does not clearly look like a VM problem. Errors in Joomla files.

Using Commercial template ?

regards

Jörgen @ Kreativ Fotografi



Title: Re: VM3.2.1: Loads of Warning & Notices showing although error reporting off
Post by: rafser on November 07, 2017, 15:34:22 PM
Sorry about that,
do you have a work around to this issue?
Title: Re: VM3.2.1: Loads of Warning & Notices showing although error reporting off
Post by: jenkinhill on November 07, 2017, 19:16:38 PM
Search?  http://forum.virtuemart.net/index.php?topic=138488   You should update your template, see the fix  http://forum.virtuemart.net/index.php?topic=137327.msg481271#msg481271
Title: Re: VM3.2.1: Loads of Warning & Notices showing although error reporting off
Post by: rafser on November 11, 2017, 05:35:43 AM
Thank you Jenkinhill

YOU ARE THE BEST!!!!