Open ro78 opened 1 year ago
@eldy any idea?
Found an old file includes/restler/framework/Luracast/Restler/Data/Object.php Seems replaced by includes/restler/framework/Luracast/Restler/Data/Obj.php
But upgrades didn't handle it. I'll try by deleting this file myself as it's no longer in the archive today.
Fix confirmed. I'll keep this issue open in case you want to fix it in the upgrade script.
Hello,
The upgrade script do not check that, unfortunately. So better to start the upgrade by deleting/moving old files.
@ksar-ksar what do you suggest for upgrades? Delete all files & folders of current installation except documents & conf, then upload the content of the new version to the folder & access the UI to run the upgrade?
Hello,
Yes it's a good way I think.
May be an upgrade of the https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/install/upgrade2.php#L4095 function
Hello, thank you @ro78 for your help. I had the same issue "error 500 with swagger.json" when trying to use the REST API.
I started using Dolibarr from 14 and now I am in 18.0.1, but never used the REST API . And I moved from php 7 to now php 8.1.24 recently.
To fix the issue deleted the "includes\restler" folder and replace it by the one downloaded from the dolibarr-18.0.2
May be this should be implemented in upgrade script for old non-developper user who use upgrade script from cpanel, as I did.
Bug
Hello,
Since the upgrade of Dolibarr to version 18, I can't use the API. I tried to access the explorer (api/index.php/explorer/), and it displays this error:
500 : https://mydomain.com/api/index.php/explorer/swagger.json
In Apache error logs:
[Tue Aug 22 17:14:07.846715 2023] [php7:error] [pid 821150] [client [IP]] PHP Fatal error: Cannot use 'Object' as class name as it is reserved in /home/dolibarr/includes/restler/framework/Luracast/Restler/Data/Object.php on line 16, referer: https://mydomain.com/api/index.php/explorer/
Environment Version
18.0.0
Environment OS
Debian 11
Environment Web server
Apache 2..56
Environment PHP
PHP 7.4.33
Environment Database
MariaDB 10.5.19
Environment URL(s)
No response
Expected and actual behavior
No response
Steps to reproduce the behavior
See above
Attached files
No response