Issues with login modules - 404 error when saving profile changes

8 months 3 weeks ago - 8 months 3 weeks ago #334696 by RobertvanderHulst
Issues with login modules was created by RobertvanderHulst
I still have issues with the login modules on our site.
When I enable the CB Login module I repeatedly see the message:

The most recent request was denied because it had an invalid security token. Please go back or refresh the page and try again.

When I enable the normal login I do not see that, but with that module registration of new users shows the error message

Please login first

Error: CB Login module not created (required).

I have tried to switch various cache options on/off to fix the first error about the security token.
I have tried to disable CB plugins with the normal login but that also does not make a difference.


What could be the problem?

Robert
 

Please Log in to join the conversation.

8 months 3 weeks ago #334698 by RobertvanderHulst
I am a bit further now to get this to work:
- On the Home page I n whave a normal Login module
- I have configured the "Create an account" button to go to a menu option that is associated with the menu option
  index.php?option=com_comprofiler&view=registers
- I have created a CB Login module that is shown on this registration page and on all the pages that are related to profiles.
- I have added a custom module on the home page that is only shown for registered users with the avatar and username
- I have a link on the avatar to goto the page to show the profile <a href="/contact/edit-profile">. This menu point is linked to
- I can choose to edit on this page
- However when I save the information on that page I get a 404 error for the page /contact/edit-profile/saveuseredit

I am getting really frustrated with all of this.
It would be the easiest if the CB login would just work and would not cause the "invalid security token" errors...


Robert




 

Please Log in to join the conversation.

8 months 3 weeks ago - 8 months 3 weeks ago #334699 by RobertvanderHulst
Ok, I think I have found why the 404 error occurs.

I have defined 5 fields, that are mapped to fields in the kunena database.
- cb_kunenathreadordening
- cb_kunenahideemail
- cb_kunenashowonline
- cb_kunenacansubscribe
- cb_kunenasignature
The first 4 are drop down - single select.
For the first I have 3 options:
0 = Default
1 = Oldest First
2 = Newest First

and so on

The last one is a multi line text field

The error occurs because the fields can have a value NULL.
CB has created these fields as Text fields, which means that I cannot set a default value for new users.

I am seeing an exception:

Exception Type: Exception
File: /home/xsharp.eu/public_html/libraries/kunena/src/User/KunenaUser.php
Line: 1254
Message: Incorrect integer value: '' for column 'ordering' at row 1#0 /home/xsharp.eu/public_html/components/com_comprofiler/plugin/user/plug_cbforums/models/kunena20.php(1079): Kunena\Forum\Libraries\User\KunenaUser->save()

When I select a value in each field then there is no error.
I have now made these fields "required" and then (of course) you will have to select a value in the fields and after that there is no longer a problem saving the values.
- It would be nice if we could specify a default value for fields like these.
- And why does CB create "Text" fields. In this case a char(1) field would have been enough?

Robert

 

Please Log in to join the conversation.

8 months 3 weeks ago #334700 by krileon
Those are old deprecated fields from CB 1.x days. Either delete them or change their types to fit within Kunena's requirements. You can map whatever field you want within CB Forums to Kunena, but it still needs to be within Kunena's requirements. Will add a feature ticket to review forcing a type conversion to match whatever Kunena expects to suppress the errors, but then it'll just map as 0 for any invalid values.

forge.joomlapolis.com/issues/9231

I still have issues with the login modules on our site.
When I enable the CB Login module I repeatedly see the message:

The most recent request was denied because it had an invalid security token. Please go back or refresh the page and try again.

Turn off Joomla page caching. Caching is generally the only reason for form tokens to fail. If issue persists please PM backend super user login credentials and will take a look.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

8 months 3 weeks ago #334702 by RobertvanderHulst
Kyle

Those are old deprecated fields from CB 1.x days. Either delete them or change their types to fit within Kunena's requirements. You can map whatever field you want within CB Forums to Kunena, but it still needs to be within Kunena's requirements. Will add a feature ticket to review forcing a type conversion to match whatever Kunena expects to suppress the errors, but then it'll just map as 0 for any invalid values.


 
I created those fields myself. Each time I edit these fields inside the Fields option from CB (for example to set the 'Required' option) in the backend, then CB changes the type of the fields back to Text. That is not what Kunena expects.
I see now that Kunena has changed the name of the column 'threadordening' to 'ordening'. Most likely that also causes problems.

Robert

Please Log in to join the conversation.

8 months 3 weeks ago #334703 by krileon
Not sure I understand. So when you edit the field the actual field type is changing on you? That shouldn't happen. When that happens changed it to Select type and re-save and see if it's still doing it.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.244 seconds

Facebook Twitter LinkedIn