User tests: Successful: Unsuccessful:
Pull Request for Issue #14072
In Joomla 4.0, when trying to save a user in the backend, the following error will appear:
Fatal error: Call to undefined method JUser::getParameters() in C:\dev\joomla4\plugins\system\fields\fields.php on line 181
because JUser::getParameters()
was removed.
Joomla 3.x AND Joomla 4.0
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Plugins |
@franz-wohlkoenig - hmm not working in J4? Worked perfectly fine for me
got Save failed with the following error: Operand should contain 1 column(s)
Are you using Save & Close
or just Save
?
Got Error in both Cases.
getParameters
returns all parameters. getParam
returns only one and expects a key to be passed. So you can't use getParam()
without any key.
Imho getParameters
is deprecated and removed wrongly as there is no method to replace it with the same function.
As for fields. the use could be removed as soon as #13353 is accepted anyway.
Fair enough. Close?
You just need to remove the command $user->params = (string) $user->getParameters(); and everything still work as expected. So I don't think you should close it
Labels |
Added:
?
|
@joomdonation @Bakual - removed the line. Tested again in J4 and working as expected
No, no , still does't work. There is still error somewhere Save failed with the following error: Operand should contain 1 column(s)
Same Error as before.
I dont know how you're both getting this error on J4. I've fetched the latest from the 4.0-dev branch and everything is working for me
Do you have any custom fields created for user?
nope
That's why you don't see error. Create a new user custom field, then check it again, you should see the error
I am not sure. I can try look at the code to see why it doesn't work
This actually is a valid fix. The error which me and @franz-wohlkoenig causes by SQL error in user profile plugin. That could be a separate PR
@franz-wohlkoenig : Please disable User - Profile plugin on Joomla 4, then test it again and report the result back
@joomdonation No Error if "User-Profile"-Plugin is disabled.
Please try to create user custom fields, then check and make sure custom fields data is saved properly. If Yes, you can mark the test as success
@franz-wohlkoenig PR for fixing the error I and you found is #14088 . Please help testing it as well
So this will only work once #13353 is merged?
I can't say if the line is currently needed or not (likely not) as I haven't tested that specific last time I rewrote something in that plugin. I saved that work for after said PR is merged since then it sure isn't needed anymore.
So its fine to mark successfully if "User-Profile"-Plugin disabled?
Yes, correct. This PR could be closed, then
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-02-16 10:43:15 |
Closed_By | ⇒ | wilsonge |
I have tested this item? unsuccessfully on 14707e7
Works in 3.7, failed in j4
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14082.