User tests: Successful: Unsuccessful:
Pull Request for Issue # .
This PR fixes some errors on User Profile Plugin on 4.0-dev branch. I saw this error while reviewing the PR #14082
You will need to apply the patch on PR #14082 before testing this PR
None
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Plugins |
Thanks for @franz-wohlkoenig. I don't have any clue why you didn't get the error in step #4, as the error is clear (can be seen from the code $db object not being available before calling $query = $db->getQuery(true) )
What's changed here. The delete stuff is 'obvious' the Operand stuff isn't obvious to me what has changed :/
Before patch, the query is:
INSERT INTO
#__user_profiles
VALUES ((309, 'profile.address1', '"Address 1"', 1)),((309, 'profile.address2', '"Address 2"', 2)),((309, 'profile.city', '"City"', 3)),((309, 'profile.region', '"Region"', 4)),((309, 'profile.country', '"Country"', 5)),((309, 'profile.postal_code', '"ZIP Code"', 6)),((309, 'profile.phone', '"084"', 7)),((309, 'profile.website', 'false', 8)),((309, 'profile.favoritebook', '"Favourite Book"', 9)),((309, 'profile.aboutme', '"About Me"', 10)),((309, 'profile.dob', '""', 11))
After patch, the query is;
INSERT INTO
#__user_profiles
VALUES (309, 'profile.address1', '"Address 1"', 1),(309, 'profile.address2', '"Address 2"', 2),(309, 'profile.city', '"City"', 3),(309, 'profile.region', '"Region"', 4),(309, 'profile.country', '"Country"', 5),(309, 'profile.postal_code', '"ZIP Code"', 6),(309, 'profile.phone', '"084"', 7),(309, 'profile.website', 'false', 8),(309, 'profile.favoritebook', '"Favourite Book"', 9),(309, 'profile.aboutme', '"About Me"', 10),(309, 'profile.dob', '""', 11)
There is an extra ( and ) chararacter for each value inserted. ((309, 'profile.address1', '"Address 1"', 1)) for example, is wrong, (309, 'profile.address1', '"Address 1"', 1) is correct.
Hope it is clear now.
https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/joomla/database/query.php#L1351
Arguments in values()
does not need additional brackets as it was before (J3.7) in raw query.
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-02-21 10:17:36 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
I have tested this item✅ successfully on 8abcb1b
Applied also Patch #14082: No Error after saving user profile and enabled User-Profile-Plugin.
Haven't Error before PR like described in Point 4 (Delete a user account. Before patch, you will receive an error Call to a member function getQuery() on unknown).
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14088.