There is an issue when I try to associate my domain with Prestashop Metric I got errors like below:
Screenshot:
The error is reproducible with the following steps:
Step 1:
Go to Prestashop -> Dashboard and open PrestaShop Metrics (Or you can open PrestasShop Metrics via module manager)
Step 2:
Next, click on the Associate button
Step 3:
Login with Prestashop Market place or create a new account if does not exist. After you have logged in, the website field www.domain.com will be inserted automatically in the domain field.
Step 4:
Now I click on accept and associate button. Unfortunately, you might get this similar error:
Error!
Your shop could not be associated with your PrestaShop account
Step 5:
Then, when you click on the problem details link it said:
["shops.0.Your shop is already linked and verified"]
At this point, if you click cancel, it will not log you in the Prestashop Metrics. So you can only see a button called View my associated shops
Step 6:
Next, I thought maybe that I need to disassociate the website first. So, you can click on View my associated shops and then click the Dissociate button. Now it will ask a question like the following message with two buttons:
Are you sure you want to remove this shop from your account?
If you have ongoing subscriptions, it will be impossible to cancel them.
[Cancel] [Dissociate]
Step 7:
Of course, I should click on Dissociate button but then I will be presented with another error:
Error message
We were unable to contact your shop, please contact support.
"Error while getting domain"
Seems like the error clearly shows something is wrong with the Prestashop server and not related to my server configuration.
Update 1:
For your information, this issue also happens with Prestashop Facebook Module. So it looks like this error is not related specifically to the Prestashop Metrics module but it is an issue of authentication logic error from Prestashop that could not handle how to associate the site with the existing domain. I have requested the Prestashop team to unlink the domain and waiting for their replies (it has been more than 24 hours).
Update 2 – Found issue with a workaround:
It has been more than 3 days and I haven’t received any updates from the Prestashop team but with my pleasure, I would like to clarify here this is indeed a confirmed bug and I found a temporary workaround but this workaround is not for everybody and I don’t like it.
The issue here is that you cannot use a subdomain www.DOMAIN.com to link or disassociate with your Prestashop account. That means, it only works if you use a root domain DOMAIN.com without a subdomain. So, this bug is more related to the native module or how the Prestashop server handles the account integration with the addons probably through a native module called ps_accounts
In order to change the subdomain to root domain in Prestashop. You can follow this step:
Go to Shop Parameters -> SEO & URLs -> Set shop URL
You need to change your Shop domain and SSL domain to non-www there
For example if your domain is www.kakispy.com then change it to kakispy.com
So, the temporary workaround is to not use a subdomain before you link your account but there is a case that the root domain can only be used to serve a web application that acts as a main site and you can only use a subdomain to host a Prestashop website. So, it is better to wait for their update if you require a subdomain www for your Prestashop website.
At the time of writing this update, I have removed/disabled those 2 affected modules temporarily because they are not usable based on my case above.
Update 3: I have received email from the Prestashop support team and the issue has been fixed.