Announcement

Collapse
No announcement yet.

How do I find the definition of a variable used inside a template?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Forum] How do I find the definition of a variable used inside a template?

    On our reset password page, after typing in an email and clicking to reset the password, VB throws an error saying "Invalid Redirect URL". The URL it gives is not exactly correct. It uses HTTP instead of HTTPS for one thing. It goes to "/login.php?do=login".

    I want to correct this URL but can't find it.

    In my Site Name settings, the Forum URL is correct, so it's not using that I think.

    When I do a search in templates, I find the "lostpw" template. In the HTML form it has this line:

    HTML Code:
    <input type="hidden" name="url" value="{vb:raw url}" />
    I'm guessing this is where VB is getting the redirect URL from, the {vb:raw url} variable? So this is my problem, I can't find where this "url" variable is defined. I've searched settings, phrases, templates, custom code, etc. I don't know why the URL output here is being rejected as an invalid redirect URL.

    Note that even with the error message, the reset password emails are being sent, and the reset works. It's just that it won't do the redirect.
    Also note that the template lostpw has not be changed, so this is the default code I guess.

    Where else can I look to change this URL and fix it? Or find that "url" variable?

    Thanks

    Click image for larger version

Name:	redirect error.png
Views:	120
Size:	4.8 KB
ID:	4409172

  • #2
    It gets the value from the settings. However, it will inherit the protocol (http vs. https) it is accessed from. You should create a redirect on your server so that every request is redirected to https. Otherwise, your server should be considered insecure. Your hosting provider can assist with this.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud customization and demonstration site.
    vBulletin 5 Documentation - Updated every Friday. Report issues here.
    vBulletin 5 API - Full / Mobile
    I am not currently available for vB Messenger Chats.

    Comment


    • #3
      I know the lost password page was surely on HTTPS, but it must have change to HTTP somewhere during the redirect process.

      I did some forcing of HTTPS and that indeed took care of it.

      Thanks

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...
      X