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 }}
Other ways existing template for export I tested them and they work
Hello,
When you installed RO CSVI 8.12.0 package did it go without any errors? The fatal errors you posted comes from Google library and was fixed in RO CSVI 8.12.0 version. Since you are seeing these error I am guessing RO CSVI update did not go well.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Hi
As I wrote in start during update to 8.12.0 I have some issue notice about unique key and failed update
But I install package again and update go well second time.
After update I get this errors, even if update itself go well second time
Hello,
We have added code in RO CSVI 8.12.0 version to copy files into Google library and that did not work in your installation and so the error. To solve this, go to folder administrator/components/com_csvi/assets/google/vendor/psr/log/Psr/Log either copy the content of file LoggerInterface5.php to LoggerInterface.php or rename LoggerInterface.php to LoggerInterface_old.php and LoggerInterface5.php to LoggerInterface.php. That should solve the error. Let me know on how it goes.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Dear Tharuna
Must be something else. I backup Templates and did fresh install I uninstall Ro Csvi, unistall all csvi plugins and then I delete all tables in database with csvi name.
I install fresh installation installation was go trough fine and when I try to create fresh template I get the same error.
J 5.1.2
VirtueMart 4.2.16 11030
PHP Version 8.3.6
I have another domain wit exact same settings and there RO csvi 8.12 work fine
When I restore template backups it success and working. So strange
Hello,
Did you try the solution posted in my previous reply? Doing a fresh install will not help if needed file is not update with installation so please try to copy the file as suggested and see if the error is solved.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Hi
Yes this was first what I did but I can see there is no difference in files both are 3.06 kb and i check also with working instance just to be sure if is any difference in code. So this is not solution
Hello,
but I can see there is no difference in files both are 3.06 kb
Did you check the contents of the file? The end should have a function like this:
public function log($level, string|\Stringable $message, array $context = array());
If you have that, the error is not coming from this file. In your previous post you only post a screenshot of the error. Can you also post the Stack trace when you get the error? That will tell us where the error originates. You can get the Stack trace by clicking on the tab called Stack trace on the error page.
Kind regards,
RolandD
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
This is the end
/**
* Logs with an arbitrary level.
*
* @param mixed $level
* @param string $message
* @param mixed[] $context
*
* @return void
*
* @throws \Psr\Log\InvalidArgumentException
*/
public function log($level, string|\Stringable $message, array $context = array());
}
This is Stack Trace:
FatalError
Symfony\Component\ErrorHandler\Error\FatalError:
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
at /public_html/administrator/components/com_csvi/assets/google/vendor/psr/log/Psr/Log/NullLogger.php:26
Hello,
Thank you for the details but it would be nice if you can post us the whole of stack trace. As of now we do not know the source file where the error is coming from. Please send us full stack trace to check.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
So first I upload again fresh only /administrator/components/com_csvi/ com_csvi folder I uload all manually so I make sure all files ar updatet.
Error was still there.
Then I uninstall 8.12 and install 8.11.2 and all work as should.
Update don't work at the moment.
But on some other domain with the same joomla and virtuemart version working OK so I don't know what on this particular instance is wrong.
Hello,
But on some other domain with the same joomla and virtuemart version working OK so I don't know what on this particular instance is wrong.
Are these domains are on same server? There is a possibility that update did not go good even though it says so when RO CSVI is installed second time.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Hi, they are on same hosting provider with the same server settings but different servers.
Hello,
So that stack trace is not really a stack trace if it only shows the same error :D Can you post (S)FTP and Joomla login details for me to check what is going on? I am sure it is not that file we spoke about but some other one, just need to figure out which one.
Kind regards,
RolandD
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Hi
Fortunately I downgrade back to 8.11.2 and now is working. But I'm ensure you there in nothing problem with files, must be something else, maybe server settings
Hello,
With the information we have here it is nearly impossible to say where this goes wrong, that is why I asked for the server login details in my previous post to investigate. This is also due to the magic of autoloaders. It is an abyss :D
Would you like to investigate this further or leave it at this?
Kind regards,
RolandD
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Hi
I would you like to investigate this further and upgrade to the latest version. But this is live website and I need it in working condition,
So I will update and give you credentials tomorrow again I will let you know when I done. Hopeful you will be able to fix it in some reasonable time.
Thank you
Hello,
Since this is a live website, we better investigate this at another time since I am not really available tomorrow. Would it be possible to create a copy of the live website on the same server, for example in a subfolder locked behind an htaccess password? That way the live website does not have to be down or is not immediately affected by it.
Let me know what you think of that idea.
Kind regards,
RolandD
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Hi
Is old post but I try again and this time update to 8.14
and exact problem exist
Please take a look here I may FTP and Joomla details
Also please run one of my name G Merchant - templates you will get error after 50 product, but maybe this is separate issue
The currently installed Joomla! version is 5.1.2
RO CSVI 8.14.0
VirtueMart 4.2.18 11050
Hello,
There is no access to RO CSVI extension with the login credentials given. There is nothing I can check now. As Roland mentioned, can you create a test site which is replica of live site? That way we are not breaking anything with live site.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Sorry I forgot apply administrator permission. would prepare live test website for you like last time. But I just don't have time. Please tray log in in administrator again and see if you can do something.
Thank you
Hello,
Yes I am able to access RO CSVI from components menu. So I ran export from one of your Google Merchant template (G Merchant EN) and see 500 error "Unsupported operand types: string * int". We need details on where that 500 error is coming from. I tried to set Error reporting to maximum in the template and unpublished template fields one by one to check if any of the fields is causing the error but anything I do with template gives me a page with 500 error like in attached screenshot. We need complete details on the 500 error so to fix it. FTP access only to plugin folder did not help either. We need access to RO CSVI folders otherwise it is difficult for us to find and fix the issue.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
At least we know that older version working if I reverse and install back to version. so must be something in files. Or maybe Virtue mart version. But Is hard to give you full error reporting since is not in my knowledge how to do this. I give you full report for my ability in my first post.
Hello,
Without proper access and debug settings we cannot help you find the root cause of the issue. It is like riding a bicycle with one wheel and being blindfolded.
But Is hard to give you full error reporting since is not in my knowledge how to do this.
You do have the knowledge to lock everything down it seems. The plugins folder is not enough as that is not where RO CSVI runs.
so must be something in files
Sure it is somewhere in the files but in the files on your site because we have no other users with these problems. Since we cannot see anything, there is nothing I can give as feedback.
Unless you are able to give us access I do not see how we can help you with this issue. Until the problem solves itself magically, you can keep using the older version that does work for you.
Kind regards,
RolandD
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
So I give you all access now via ftp and super user.
I create a backup just in case
Set errors report on maximum and debug. Never mind even if is live site.
I also update all to latest
VirtueMart 4.4.4 11101
PHP version 8.4.1
Joomla! version 5.2.0
RO CSVI 8.14.0
Hope this helps.
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
Hi
I apply your fix and I confirm all work as should
Excellent job as always
Thank you very much .
The funny thing is I also using elastic search and Ro csvi on other website and there working all. Nerveless I will applay this fix also there. Thank you again
Hi,
This can happen as it depends in which order which file is loaded. That is either a lucky website or this one is an unlucky one. :D
Kind regards,
RolandD
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Log in to reply to this topic.