Open cappuccinonet opened 3 years ago
Hello is there any update regarding the Joomla 4 support?
I'm pleased to see signs of development activity, but sadly this useful component doesn't seem to be operational on Joomla 4 yet. There is at least one instance of a Joomla call that doesn't work - Call to undefined method Joomla\CMS\Factory::getURI() in ...com_api/libraries/plugin.php:435. And Joomla 4 seems unable to route the menu entries generated by the component.
Maybe a bit cheeky to mention it here, but as I was stuck for a reliable way to create an API in Joomla 4, I created a plugin to make it easy. It doesn't have the functionality of com_api but does enough for me. You can see it at https://remository.com/downloads/Free-Joomla-Extensions/
:getURI()
What about this error? Are there any solutions for J4? Anyone has a successful implementation?
What I found (fixing Type 500 Errors):
Factory::getURI() error: Factory:: getUri has been removed use Uri::getInstance() instead. https://docs.joomla.org/Potential_backward_compatibility_issues_in_Joomla_4 Files: ..components\com_api\libraries\authentication\user.php ..components\com_api\libraries\plugin.php => Solultion: Replace Factory:: getUri() with Uri::getInstance()
Class "JArrayHelper" not found error The following classes and interfaces have been removed in Joomla! 4.0: JArrayHelper use Joomla\Utilities\ArrayHelper; instead. Files: ..administrator\components\com_api\controllers\keys.php ..administrator\components\com_api\tables\log.php => Solution: Replace JArrayHelper with ArrayHelper
Edit: After fixing this two errors I got rid of the 500 (Internal Server Errors).
Now I can connect from frontend to server but I get following 403 Error:
"API Rate Limit Exceeded"
My Rate Limit it high enough.
Any ideas how to fix this?
To temporary fix this I can set rate limit to 0 (in backend > API > options).
Now I get following new 500 Error when using a POST (write) API-Call:
__clone method called on non-object
There seems to be a problem when I want to return some value with following function:
$this->plugin->setResponse();
If I just return nothing, there is no 500 Error.
Maybe it has something to do with the J4 plugin changes?
https://docs.joomla.org/Potential_backward_compatibility_issues_in_Joomla_4#Plugins
Any ideas / help? @coolbung @parthlawate @ankush-maherwal @manojLondhe
Hello!
Thanks for contacting us.
Note that in order to get support for our products, you need to use one of the below methods as applicable. Please login to your account at techjoomla.com and go to Support> Help Desk . Please use the Support Tickets, which makes us help you better since all information and previous tickets by you are organised together. If you have already added a ticket for this issue. Ignore this email ! Note that you need an active support subscription to add tickets. -- Joomla Extensions, Custom Development & Consultation https://techjoomla.com Follow Us : @techjoomla https://twitter.com/techjoomla Like Us on Facebook : https://www.facebook.com/techjoomla
On Sun, Feb 5, 2023 at 3:14 AM Marcel Schürmann @.***> wrote:
To temporary fix this I can set rate limit to 0 (in backend > API > options).
Now I get following new 500 Error when using a POST (write) API-Call: __clone method called on non-object
Any ideas / help?
— Reply to this email directly, view it on GitHub https://github.com/techjoomla/com_api/issues/130#issuecomment-1416856867, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEOQPDBCKUBT6LUQ2ZBOPGTWV3EVLANCNFSM5DUHLIQA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
--
Warm Regards, Techjoomla Team Joomla Extensions, Custom Development & Consultation Web : https://techjoomla.com/ https://www.techjoomla.com/?utm_source=EmailSignature&utm_medium=contactTechjoomlaEmail&utm_campaign=TrafficByEmail Twitter : https://twitter.com/techjoomla Facebook : https://www.facebook.com/techjoomla https://www.facebook.com/techjoomla Blog : https://techjoomla.com/blog https://techjoomla.com/blog?utm_source=EmailSignature&utm_medium=contactTechjoomlaEmail&utm_campaign=TrafficByEmail
@UmeshBhosale Thanks for the feedback. I will make a ticket for further / bigger problems.
In the meantime I could fix following error:
__clone method called on non-object
By converting the API response from array:
$this->plugin->setResponse($output);
to an object:
$this->plugin->setResponse((object)$output);
Now only the API-Rate limit problem is to be fixed.
Thanks for the update!
On Tue, Feb 7, 2023 at 4:06 AM Marcel Schürmann @.***> wrote:
@UmeshBhosale https://github.com/UmeshBhosale Thanks for the feedback. I will make a ticket for further / bigger problems.
In the meantime I could fix following error: __clone method called on non-object
By converting the API response from array: $this->plugin->setResponse($output); to an object: $this->plugin->setResponse((object)$output);
Now only the API-Rate limit problem is to be fixed.
— Reply to this email directly, view it on GitHub https://github.com/techjoomla/com_api/issues/130#issuecomment-1419878948, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEOQPDGSGG3DSBBFUDBG6L3WWF4IPANCNFSM5DUHLIQA . You are receiving this because you were mentioned.Message ID: @.***>
--
Warm Regards, Techjoomla Team Joomla Extensions, Custom Development & Consultation Web : https://techjoomla.com/ https://www.techjoomla.com/?utm_source=EmailSignature&utm_medium=contactTechjoomlaEmail&utm_campaign=TrafficByEmail Twitter : https://twitter.com/techjoomla Facebook : https://www.facebook.com/techjoomla https://www.facebook.com/techjoomla Blog : https://techjoomla.com/blog https://techjoomla.com/blog?utm_source=EmailSignature&utm_medium=contactTechjoomlaEmail&utm_campaign=TrafficByEmail
Please, could you let us know, if there are plans to support Joomla 4 with com_api as well?