Help

0

Select database in website

Avatar
Jose Luis Benitez

So I need to set in some way the database in the shop page to use the share buttom from facebook and twitter in each product because if it isn't specified facebook gets a 404 error, the  same happens if I try it in cURL so I got to the conclusion that not knowing the database is the problem, and the facebook sharer shows the tittle saying "404 Not Found" and no image.

At the same time I need to keep the database selector menu in cases where I need to do some backups in an easy way so it's not an option to set with -d or with db_name.

So I thought if in you can select in web the database through the url this way "http://localhost:8069/web#bd=ecommerce" then there should be a way to do it in the shop, where is the actual problem I'm having.

This is the results of facebook debugger: https://developers.facebook.com/tools/debug/?q=http%3A%2F%2Fwww.syopar.com.py%2Fproducto%2F927%2Falarma-para-piscina-con-sensor-bestway

Avatar
Discard
1 Answer
0
Avatar
Xavier Brochard
Best Answer

A better way is to set a domain or subdomain per database.

You need to put it in Name Server (DNS), Web server (like Nginx) and in odoo.conf

In odoo.conf, you will set db-filter: it specifies how the database should be selected based on the hostname (domain) that is being requested. The value is a regular expression, possibly including the dynamically injected hostname (%h) or the first subdomain (%d) through which the system is being accessed.

See Deploying Odoo documentation: https://www.odoo.com/documentation/13.0/setup/deploy.html


Avatar
Discard