Skip Navigation

[Resolved] CRED redirect redirects to homepage

This support ticket is created 5 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 12 replies, has 2 voices.

Last updated by Beda 5 years, 10 months ago.

Assisted by: Beda.

Author
Posts
#1191317

I am trying to: troubleshoot why Access is redirecting CRED on login to homepage

Link to a page where the issue can be seen:

I expected to see: a form on a page that I specified in cred

Instead, I got: my static homepage

#1191375

hidden link is supposed to redirect to hidden link. It instead sends you to the homepage. Go ahead and create a user.

--Sam

#1191430

I get redirected here:
hidden link

The page is a 404 because trashed, it seems?

This might be the reason you see a redirect, however, I cannot replicate the redirect to the homepage.

It seems something attaches the 2__trashed part to the Page Slug you want to redirect to.
That could be solved by making sure the page's slug you want to redirect, and remove eventual copies or trashed duplicates, then re-save the Toolset Form's redirect settings.

If that does not help, I will need more details on how you replicate this, as locally the redirects to existing pages on user forms work fine, I tested them while crafting this reply.
It might, of course, be a missing setting or any other difference.

If the issue persists after the above steps, we need to find this difference which then will tell us how to replicate (and later fix) it.

However, first, I would suggest to:
- test above steps
- make sure the website is updated (I see several involved software pend an update, which could always solve the issue)
- Make sure to review these details as well:
-- the page seems to be hidden for guests behind the template for logged out users, and that features the login form of WordPress (not a Toolset Form) only.
-- the only Toolset Form that a guest can see according to your Toolset Access rules set is the user Toolset Form, which features no redirect, as seen here: hidden link it says "go to a page" but no page is specified (which leads me to believe that at some point the page you expect, got removed or renamed?)
-- that form just features PWD and Repeat PWD field, and is not visible, on pages, for guests.

It might be that I miss a detail, please let me know.

#1191507

Hi Beda,

Thank you for reviewing this so carefully. I have corrected the redirect. Could you test again?

The content template called "Login Form" contains the Toolset shortcode for the login form. The login form appears (in general) when a page is redirected to (since Pages are under Access Control). That's the correct behavior. I just tested it again. I can now reproduce the redirect to the homepage.

The only plugin needing to be updated is genesis extender. It's update procedure is slightly complicated, so I can't update it immediately until I get back to the office, but deactivating it entirely still redirects me to the homepage -- which is a blank page titled Homepage that calls a widget area -- so if you disable genesis extender, you are redirected to a blank page titled Homepage but the bug is still there.

I wasn't able to replicate the issue with the fields. All the fields in Register for the Intranet (ID: 72) appear for me as a guest.

--Sam

#1191513

I just updated Layouts, disabled and removed all layouts. It's legacy. I just wanted you to know.

#1192291

So in further testing, my admin account does display the destination in the user form dropdown. so far, I have not been able to get a Author or a subscriber (making sure that subscriber had its own privileges) to be able to be successfully redirected.

--Sam

#1192333

Thank you for responding on social media during off-hours. I have disabled Access and the final form displays fine. That's a pretty complicated one though, because without Access no login occurs either. (everything is accessible.)

--Sam

#1192447

Ok, I see that on hidden link, the User Form Register with password prompt is used.
Access Plugin seems disabled at the moment.

As a guest that form can be submitted and it redirects here
create-your-profile/?cred_referrer_form_id=72
There I am asked to complete the profile, which I did and submitted, and was redirected here nested-view-page/?cred_referrer_form_id=280
On that page a View seems displayed, as I see:

Please enter your department below. And then submit it. Enter any additional departments, and then you are finished.

No items found

However, the form seems to work.
Now, if I would want the same to work with Toolset Access active I would have to ensure the Form in question is freed by Toolset Access in Toolset > Access > Toolset Forms for guests.

If you want, I can activate Toolset Access back on and set it up so to control that form (those forms) with Access and still let Guests access them (I assume, guests should see those forms, as all others will have an account)

From what I gather, until now Guests role was not allowed to see the form in the Toolset Access settings (confirmed thru a very short enabling of Access and again setting it back to disabled as it was).

I think as soon you check "guest" in the Access permission this should be solved.

#1192619

Hi Beda,

Again, I appreciate your testing. The form cannot be visible to guests though, because guests shouldn't be able to see the form without logging in.

You can go ahead and turn on Access on. That view is of a Relationship Form... I have no idea why it didn't appear.

--Sam

#1192639

That view requires the user to be logged in. That's why it doesn't work when Access is turned off.

#1192901

OK, I understand

On the website, the page we land as guests is hidden link, and there the Form "Register with password prompt" is used.
This form, I assume, should be visible to guests to register as users.
Hence I Activated Toolset Access and made sure this form can be seen and used by guests.

I noticed that you had that Form (User Form "Register with password prompt") set to be used by guests, and the page where it's inserted to is also readable by guests as set by the "Guest User Access".
All good so far, this form should be visible and usable by Guests.

The Form itself is redirecting to "Create your Profile" page, on success.
That post is controlled by the Access Plugin too using the "Subscriber or above permissions". That Group leaves no read access to guests, and if a guest tries to reach the page a content Template is used as error:
The "Login Form" Content Template.
The whole "pages" post type is as well hidden from guests, so unless otherwise specified the guests cannot reach pages, but will see the login form.

Testing this would mean I should see hidden link as a guest, but I should not see its target (hidden link) if I am not a user (guest).
And that is exactly what is happening with the current Access settings because a guest cannot reach the hidden link page, the guest will instead see the login form as the content template used as error correctly sets.

If I used the form, as a guest, on hidden link, and then I am subsequently redirected to hidden link, where I see the login form.
When I log in there, I am redirected to hidden link.

Is this the issue you mean? It should - after logging in, redirect to the page you initially intended them to be (hidden link)
For this, try to set the target in the Toolset Login ShortCode you use to create the login form.
It has a target attribute you can use to target the page to redirect to.
It defaults to the current URL, so leaving it empty should redirect to the current page.

This is interestingly just as you inserted it into the content template.

Even logging out and in on that page as such user, will redirect me to the homepage, and that's unexpected, and also does not happen locally on a testing suite of mine.

For now, a solution can be to redirect to a hardcoded URL but that would mean redirecting from any of your login content templates protected pages to the same URL and that's not what you want I assume.

This problem could be due to the usage of Access Groups and controls over those pages, to further narrow down the precise steps I downloaded your Access settings and applied them locally, but I got an "Unable to open zip file" on import, that is something which as well does not happen with my own exported files.

Instead of making a lot of tests online to narrow down this redirect problem I can offer to do them locally on a duplicate of your site or a copy of a staging instance of it, this is faster and more precise for such fine-tuning issues.

I would locally also test things like not using "User Switching" plugin, which may interfere with this here, or "Login or Logout Menu Item", which seems to handle similar aspects, and eventually others.

Of course, you can do such tests also online, by disabling mentioned software and playing with the Access rules until the precise steps are found, however, I can help you with that on a local copy, made according to https://toolset.com/faq/provide-supporters-copy-site/

#1194092

Your hunch that it was a plugin incompatibility was correct. I will narrow down which of the two. I disabled both User Switching and the Login Menu Item plugin mentioned above, and the problem went away.

--Sam

#1194115

Great.
When I saw you use other "user" plugins I thought it is worth a try.

Now, if you want, we can narrow down the conflict, make sure it's not a bug in Forms, and contact the author of that plugin to arrange adjustments supposed to fix the issue.

I would need the exact name, author, email of the author, and steps to the issue on a clean install (I can help with this).
Then I can make sure it's not an issue surging from Forms code, and proceed.

Later you might be able to proceed using both plugins without conflict, as a "reward" for the current testing 🙂

I opened private forms for you to provide the details if possible

Thank you.