Hi
im using MODX 2.5.6. In the resources/elements/files panel, when i navigate to files and edit a core php file, the edit fails to save. The logs show this
PHP warning: Declaration of Lead::save() should be compatible with xPDOObject::save($cacheFlag = NULL)
it doesnt look like a permissions issue and chmod shows 0755 on the folder the file belongs in. If I edit the file directly outside of modx, i can save my changes. i have also added php to uploadable file types system settings.
So, I am baffled…any ideas?
Please advise
Rgds
Maybe a firewall on the server is blocking the request.
You should upgrade your installation. Versions prior to 2.6.5 have critical vulnerabilities.
Tried that with hosting provider and proved it wasnt a firewall issue by editing the fie outside of modx
Open the developer tools in your browser and go to the “Network” tab.
Then click the “Save” button for the PHP file in the manager.
A new XHR request should appear with the “action” parameter browser/file/update
.
Is this request successful? Is "success":true
in the JSON response?
That usually means that two functions with the same name, and are both in scope at the same time, have different signatures (arguments and return types).
I’d say it’s trying to use the Lead
class’ save()
function to save the file rather than the save()
function it’s supposed to use. I’m not aware of any Lead
class in MODX and can’t find one, so that class may be in an extra that you have installed.