Author Topic: VM invoice gives warnings but no warnings on frontend  (Read 2809 times)

welrachid

  • Jr. Member
  • **
  • Posts: 260
  • 3rd party plugin developer
  • Skype Name: wel.rachid
  • VirtueMart Version: Always LATEST stable
VM invoice gives warnings but no warnings on frontend
« on: May 01, 2017, 11:28:13 am »
Joomla set not to show warnings, but when i click invoice i get a lot of warnings.
any ideas how to make that disabled aswell?


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


J!3.7
VM3.2.1
PHP5.6.24
Best regards,
Wel

welrachid

  • Jr. Member
  • **
  • Posts: 260
  • 3rd party plugin developer
  • Skype Name: wel.rachid
  • VirtueMart Version: Always LATEST stable
Re: VM invoice gives warnings but no warnings on frontend
« Reply #1 on: May 02, 2017, 22:35:30 pm »
Okay.. very weird.
Somehow these errors are caused by the "2nd" parameter to the jhtml::stylesheet method which is getting a STRING when expected an array
I got a
http://example.dk/components/com_virtuemart/assets/css/

where i should have had an array.

I made a core-hack fix, until i know why this is happening..
I've replaced libraries/cms/html/html.php line 617
BEFORE:
}
AFTER:
      }elseif(!is_array($options)){$options = array('relative' => false, 'pathOnly' => false,'detectBrowser' => true, 'detectDebug'=>true);}


Im not sure if its a template-thing or not..
but i've been using vmbeez5 as basis.
Best regards,
Wel

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9854
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: VM invoice gives warnings but no warnings on frontend
« Reply #2 on: May 03, 2017, 09:17:19 am »
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

vmJsApi::css('vmpanels');
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

mickey3k

  • Beginner
  • *
  • Posts: 9
Re: VM invoice gives warnings but no warnings on frontend
« Reply #3 on: May 23, 2017, 20:25:02 pm »
Are there more lines in some files where we have to replace with vmJsApi? I replaced line 23 in edit_address.php but the error messages are still showing.

Only with welrachid's core hack can I get rid of them, but every Joomla Update resets this line.

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8940
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.4.2
Re: VM invoice gives warnings but no warnings on frontend
« Reply #4 on: May 23, 2017, 21:18:49 pm »
Not in vm3.2.2 but there could easily be in your over rides
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation