1. DarkoF
  2. RO CSVI
  3. Tuesday, 13 August 2024
  4.  Subscribe via email
Hi
during update to 8.12.0 I have some issue notice about unique key and failed update but I install plugin again and all working.

Now when I try to create new template or just enter and save existing one again I get 500 server error

This is debug lines:


Deprecated: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in /public_html/administrator/components/com_csvi/models/template.php on line 328

Deprecated: Optional parameter $cid declared before required parameter $vendorId is implicitly treated as a required parameter in /public_html/plugins/geekelasticsearch/vmproduct/vmproduct.php on line 461

Deprecated: Optional parameter $level declared before required parameter $vendorId is implicitly treated as a required parameter in /public_html/plugins/geekelasticsearch/vmproduct/vmproduct.php on line 461

Deprecated: Optional parameter $onlyPublished declared before required parameter $vendorId is implicitly treated as a required parameter in /public_html/plugins/geekelasticsearch/vmproduct/vmproduct.php on line 461

Fatal error: Declaration of Psr\Log\NullLogger::log($level, $message, array $context = []) must be compatible with Psr\Log\AbstractLogger::log($level, Stringable|string $message, array $context = []): void in /public_html/administrator/components/com_csvi/assets/google/vendor/psr/log/Psr/Log/NullLogger.php on line 26
FatalError
HTTP 500 Whoops, looks like something went wrong.
Compile Error: Declaration of Psr\Log\NullLogger::log($level, $message, array $context = []) must be compatible with Psr\Log\AbstractLogger::log($level, Stringable|string $message, array $context = []): void
Symfony\Component\ErrorHandler\Error\
FatalError
Show exception properties
Symfony\Component\ErrorHandler\Error\FatalError {#1956 ▼
-error: array:4 [▶]
}
in /public_html/administrator/components/com_csvi/assets/google/vendor/psr/log/Psr/Log/NullLogger.php (line 26)
* * @return void * * @throws \Psr\Log\InvalidArgumentException */ public function log($level, $message, array $context = array()) { // noop }}
Accepted Answer
Accepted Answer Pending Moderation
Hello,

Hope this helps.
This has certainly helped and I have been able to trace back to the actual point the whole thing goes belly up. This happens inside the ElasticGeek ClientBuilder.php file. To be exact, this piece of code:

private function buildLoggers(): void
{
if (is_null($this->logger)) {
$this->logger = new NullLogger();
}

if (is_null($this->tracer)) {
$this->tracer = new NullLogger();
}
}
That is also the reason you experience the issue and not any other users as you seem to be the only one using ElasticGeek. The actual NullLogger of ElasticGeek does not match the signature of Joomla nor does the RO CSVI NullLogger match that. You just got lucky that the RO CSVI one breaks otherwise the ElasticGeek would break at some point. For the next release of RO CSVI, I will add some more hardening on this file so it won't break at the RO CSVI point at least.

Now for the error about the operand type int*string, I have traced that back to the convertWeightUnit function of VirtueMart. Specifically this line of code:

$g = (float)(1000 * $value);
This piece of code is triggered by the custom_shipping field of the SKU wine-tasting-slovenia. This product has no weight so you get 1000 * '' which is invalid. Either exclude this product from your Google Merchant file or set a weight so it can calculate the shipping price.

I have not checked if you have more products without a weight, if you do, they may break the export as well. This will also be hardened in the next release.

The FTP connection did not work for me but you can fix the 500 error by editing the file administrator/components/com_csvi/assets/google/vendor/psr/log/Psr/Log/NullLogger.php and change line 26 to:

public function log($level, string|\Stringable $message, array $context = []): void
Save the file and the 500 error should not happen anymore. The other error will happen if there is a product with no weight set.

Let me know how it goes.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # Permalink
Sorry, the discussion is currently locked. You will not be able to post a reply or a comment at the moment.