News:

Looking for documentation? Take a look on our wiki

Main Menu

Back in stock notification not working

Started by bennopriceless, January 20, 2019, 06:52:21 AM

Previous topic - Next topic

GJC Web Design

in  /home/mysite/public_html/libraries/src/Language/Language.php line: 364  add some backtrace() to try and find where it is being called from

https://www.w3schools.com/php/func_error_debug_backtrace.asp

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 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
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

bennopriceless

Hi there,

Thank you for the reply but I'm a little bit confused about how to do this. The code on that line is as follows;

$string = str_replace(array('\\\\', '\t', '\n'), array("\\", "\t", "\n"), $string);

How would I add the backtrace to this? If I copy and paste anything to the end of that is causes an error on the site.

Apologies for the inconvenience, my coding skills are very limited.


Jörgen

Then You should add this on the line before the failing line:

var_dump(debug_backtrace());

best regards
Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

bennopriceless

Thank you, no errors on the site with this but what is the next step? Where can I view the results of this backtrace?

In the error log I can see a line I didn't notice before but I'm not sure if it is related to this issue or not:

[26-Jan-2019 05:17:08 Pacific/Auckland] PHP Warning:  array_replace(): Argument #2 is not an array in /home/mysite/public_html/libraries/src/Document/Document.php on line 694

Please advise.

Thank you very much for your time.

Jörgen

Debugging an old VM and Joomla version almost totally blind is an impossible task. Hire a developer or upgrade to the latest VM and Joomla verions.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

bennopriceless

Hi,

I am already on the latest versions:

VirtueMart 3.4.3 10005
Joomla! 3.9.2 Stable
PHP 7.2.13 (Max my server supports)

GJC Web Design

As Jörgen says -- to debug this you have to have some knowledge of php etc and access to the site

to do that you need a dev and they will want paying..

you can use the backtrace immediately after the function call or start looking at the params that are being received

the error is  Object of class stdClass could not be converted to string

so is $string an object? if so why when the func is expecting a string? where is it sent from?
where is  public function _($string, $jsSafe = false, $interpretBackSlashes = true) being called from?

afaik Vm uses all its own functions for things like this so is the culprit even VM in this case or some other plug/ext etc
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 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
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation