Wrong Site URL in the header.inc - Fresh Install - UNA B4

Hello @UNA Inc Team,

All my UNA site are working fine and I have successfully managed to update them from B3 to B4.

Then I decided to install another Dev Site from scratch using B4 because I wanted to test few things I am working on.

The installation went smoothly and the site was working fine except the connection to the UNA server in the Apps Market.

When trying to access the Apps Market I got the following error even with a valid UNA license and the key, secret and the cron job set correctly:

'THE REDIRECT URI PROVIDED IS MISSING OR DOES NOT MATCH'

After hours upon hours of investigation, I found the problem in the header.inc file: Wrong site URL.

My server is set to use https://www domains (e.g. https://www[dot]mysitehere[dot]com) and all the non-www domains (e.g. https://mysitehere[dot]com) are being redirected to https://www.

Unfortunately, upon installation, the UNA system saved my site URL as a non-www domain which didn't match the https://www domain associated with my key and secret in my UNA account. That's why the system couldn't connect to the Apps Market.

The solution to fix this small issue was to manually change the BX_DOL_URL_ROOT parameter (my site url) in the inc/header.inc file and add www. Now, the Apps Market connects. I was able to download and install apps.

@Alex T⚜️, please try to investigate this issue. The BX_DOL_URL_ROOT saved in the inc/header.inc should be according to the setting of the domain or server where UNA is being installed. UNA installation should be able to check/detect whether it is a https://www or non-www domain.

Thanks

  • 1082
  • More
Replies (12)
    • I recently had TMD hosting install UNA B4 and when attempting to access the Apps Market I get the message THE REDIRECT URI PROVIDED IS MISSING OR DOES NOT MATCH'

      TMD says ask UNA to fix this problem.

      Can anyone please help!

      Sig

      • Hi @@Sigmund Taubert

        Please check this link: https://una.io/my-sites

        1. Do you have a valid UNA License? You can check it in the link above or here: https://una.io/products-licenses
        2. Have you registered your site URL in your UNA account and generated the Key and Secret? See: https://una.io/kands-manage
        3. Have you entered your Key and Secret in your UNA installation? Please Go to Studio > Settings App > General.
        4. Have you checked your Cron job? Have you set it correctly and is it running? When was the last cron jobs execution? To find out, please Go to Studio > Dashboard > Host Tools > Server audit (check under Site setup)
        5. Have you read my post above? It might be the wrong site url in your header.inc file (the config file). Please Go to inc/header.inc on your server where UNA is installed and check if the BX_DOL_URL_ROOT parameter (your site url) was set correctly upon installation. if not, then change it accordingly to meet your domain setting whether you are using a https://www or non-www domain. Please make sure that your site url saved in your header.inc file matches the url associated with your key and secret in your UNA account. See: https://una.io/kands-manage
        6. If needed you can even reset your license here: https://una.io/products-licenses, then access the Apps Market again. It will associate your license with your site again.

        Hope I have helped you. Thanks

        • Hello @OneEagle !

          The UNA installation script reproduces the actual URL where it was launched. The fix you mentioned is known so I guess there is nothing to do specially.

          • Hi @LeonidS

            Thanks for the reply. I launched the UNA installation script from a https//www domain url. As mentioned previously, my server is set to use https://www domains and all the non-www domains are being redirected to https://www. I don't access my site through a non-www domain but still the installation script saved my url as a non-www in the header.inc. So, i still believe that the script doesn't detect and pick the correct url. It's something that definitely needs to be investigated.

            • Humm, interesting - even Dolphin could detect the www / no-www deals properly. So in UNA I see that first message about it too. Will wait for other similar signals.

              • lol @LeonidS. That was funny :)

                Yes, let's see if someone else will have the same issue. Thanks

                • Hello!

                  I use siteground, and they need to know the frequency for the chron job, but i can't find that frequency anywhere in the documentation. what should I tell them? ( i also have the same error as OP and im pretty sure my chron job script is not yet implemented)

                  • Hello @Embody !

                    The Cron Jobs(the periodic/cron.php file) for UNA should run every minute (* * * * *).

                    • Thank you! i did the fix suggested in the post (manually changed the BX_DOL_URL_ROOT parameter (my site url) in the inc/header.inc file and add w w w but the issue still remains with the redirect error message. any suggestions? @LeonidS

                      • OMG finally i was able to fix it. I had to generate a new key, and use the proper URL structure there. it was blank from my original install. such a relief my gosh. but as a follow up - my site is now all at w w w(dot)mysite(dot)com and if i want to have no w w w. then can i just do a 301 redirect? i tried this and then the site wouldnt work "too many redirects" error. @LeonidS

                        • Did you clear all caches in the Dashboard after that "manual change"?

                          • yess, ive got it sorted now. i had to clear the cache. did a clean install also and everything is working great thanks.

                            Login or Join to comment.