Keyword

New registered users unable to post

More
7 years 2 months ago #160833 by Rob
Replied by Rob on topic New registered users unable to post
Hi Mohamed,

I can see your image now. Yes, that value is set. But is that value used if the K2 user profile is disabled? Again, I am using the standard Joomla! registration page, not the K2 template.

Thanks,
Rob

Please Log in or Create an account to join the conversation.

  • Mohamed Abdelaziz
  • Mohamed Abdelaziz's Avatar
  • Offline
  • Platinum Member
  • Joomla Developer
More
7 years 2 months ago #160834 by Mohamed Abdelaziz
Replied by Mohamed Abdelaziz on topic New registered users unable to post
I think no, you need to register using K2 registration form in order to assign this group properly.

Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store

Please Log in or Create an account to join the conversation.

More
7 years 2 months ago #160835 by Rob
Replied by Rob on topic New registered users unable to post
Ok, yes. This is exactly the problem I am trying to get resolved. Let me restate again.

My request is that I would like to use the standard Joomla! registration template and still allow registered users to comment on K2 items without having to manually set the K2 group. You seem to confirm that currently this is not possible. My suggestion is to have it work this way;

When a new user is created via the Joomla! registration method, K2 adds this new user to the default group given in the advanced option you show ("default K2 default user group for new registration") regardless of the setting "Enable K2 User Profile" (which really seems to have more to do with the form template than enabling K2 profiles).

The other way to fix this would be to check the user's associated Joomla! group as well as the K2 group for proper privileges. Then it would be a simple matter of making sure that my default Joomla! group matched exactly the K2 group that has permissions to comment.

Hopefully it is clear.
-Rob

Please Log in or Create an account to join the conversation.

  • Mohamed Abdelaziz
  • Mohamed Abdelaziz's Avatar
  • Offline
  • Platinum Member
  • Joomla Developer
More
7 years 2 months ago #160838 by Mohamed Abdelaziz
Replied by Mohamed Abdelaziz on topic New registered users unable to post
Hi Rob,

I can suggest a simple hack to solve this problem, you may test it on your site if you like.
The hack will be applied to the file plugins/user/k2/k2.php, find this line:
if ($mainframe->isSite() && $task != 'activate' && JRequest::getInt('K2UserForm'))

And replace it with this line:
if ($mainframe->isSite() && $task != 'activate' )

Make sure to backup the file before applying the hack.

If this works, I will make a PR to add it to K2

Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store

Please Log in or Create an account to join the conversation.

More
7 years 2 months ago #160840 by Rob
Replied by Rob on topic New registered users unable to post
Hi Mohamed,

Thanks for the reply. I made the change and did not see a difference in behavior. I should explain better what the failure looks like.

When a non registered user looks at a K2 article they see "Login to Post Comments".

When a registered user belonging to the correct K2 group is logged in, the comment form is shown.

In my reported scenario with a valid Joomla! registration, but with no default K2 group assigned, the comment form area is blank. I see neither the first message to login nor any part of the comment form.

-Rob

Please Log in or Create an account to join the conversation.

  • Mohamed Abdelaziz
  • Mohamed Abdelaziz's Avatar
  • Offline
  • Platinum Member
  • Joomla Developer
More
7 years 2 months ago #160841 by Mohamed Abdelaziz
Replied by Mohamed Abdelaziz on topic New registered users unable to post
Hi Rob,

The change I suggested works on the registration process, it should solve the problem of not assigning a K2 group for NEW users registered using Joomla registration form.

It will not affect the current users who have registered before applying the change.

If this change works with the new users, it is possible to solve the current users problem with running an SQL statement for one time.

Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store

Please Log in or Create an account to join the conversation.

More
7 years 2 months ago #160842 by Rob
Replied by Rob on topic New registered users unable to post
Ah ok! That was the trick. I was testing with a previously registered user. It looks to be working well, thanks! On a side note, it doesn't work if the user is created in the Joomla! back-end. I don't plan on using that method, so it shouldn't be a concern.

Thanks for the fix.

Rob

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum