- Posts: 5
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- K2 Edit Profile shows Error in Frontend after change to PHP 7.2.7
K2 Edit Profile shows Error in Frontend after change to PHP 7.2.7
- Andreas Schrader
-
Topic Author
- Offline
- New Member
The Site and Function worked fine with PHP 7.0 but throws this Error when I changed the PHP Version to 7.1 or higher.
Do you have any suggestions, what I have to change in the Code to fix this? Changing the PHP Version back to 7.0 is not an option, because my Client wants to change the PHP Version directly to 7.2.
Thanks for your Feedback :)
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Also can you send me the line where this error occurs ?
It must have been printed or recorded in your error log.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Andreas Schrader
-
Topic Author
- Offline
- New Member
- Posts: 5
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Andreas Schrader
-
Topic Author
- Offline
- New Member
- Posts: 5
I also changed the Code in line 142 to: $menu = $application->getMenu(); because the JSite will no longer work
github.com/getk2/k2/blob/master/plugins/user/k2.php#L142
Please Log in or Create an account to join the conversation.
- Andreas Schrader
-
Topic Author
- Offline
- New Member
- Posts: 5
I also changed the Code in line 142 to: $menu = $application->getMenu(); because the JSite will no longer work
github.com/getk2/k2/blob/master/plugins/user/k2.php#L142
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
I will investigate why PHP 7.2 does not like this.
Care to make a PR for $menu = $application->getMenu(); ?
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Andreas Schrader
-
Topic Author
- Offline
- New Member
- Posts: 5
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- burnyourears
-
- Offline
- Senior Member
- Posts: 66
The weird thing: When I get the error, changes are saved though ...
Andreas, after you changed the code – are changes in the user profile still saved?
Please Log in or Create an account to join the conversation.
- Aram
-
- Offline
- New Member
- Posts: 12
Andreas suggestion seems to work! I'm able to save profile changes.
Please Log in or Create an account to join the conversation.
- Asim Gill
-
- Offline
- New Member
- Posts: 1
User can't edit anything including description and avatar image. Even deletion of avatar doesnt work.
Would really appreciate some help as this is a core feature I'm hoping to use!
I can make changes from the back-end as an administrator, but not as a user on the front-end.
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Let us know.
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Dan Carroll
-
- Offline
- New Member
- Posts: 3
I've installed the latest version as per Fotis' suggestion.
I no longer receive the Error 0, however the changes will only save under some conditions..
It has to do with the password/password verify fields.
If you do not supply a password, or supply the password in both password+verify fields, the k2 profile as well as any other custom user plugins save.
If you only put the password in the password field (a lot of browsers pre-fill this for you) then only some of the data saves.
In this case:
* The basic user data saves.
* The user.profile plugin data saves.
* The k2 plugin data does not save.
* My own custom user plugin (same code as user profile, just extra fields) does not save.
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Dan Carroll
-
- Offline
- New Member
- Posts: 3
I found the problem after a day or two..
It seems my joomla template was missing the messages definition:
<jdoc:include type="message" />
When you only put one password in (even it if is correct) then Joomla thinks you are trying to change the password and fails because the passwords don't match.
I did not know this was the reason because I did not see the error message.
The strange thing is that without the messages definition, the save does not work, but when you include the message definition the save *does* work fine..
Either way, my conclusions are:
1. It's a joomla core issue.
2. It's not an issue when you properly build the template...
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- K2 Edit Profile shows Error in Frontend after change to PHP 7.2.7