Closed jholze closed 8 years ago
@kaerdsar i added the label v9, should create a ticket to port these changes to v8 or how you handle it ?
Now a page refresh after change seo_url in Promote Panel. Also you can use the old seo_url and the system redirects to the new one. The module saves the old seo_url in order to can redirect, it is not depends of cache.
:+1:
@rruebner maybe you could do a short review tomorrow. Ne need to merge the update to two of our projects
If #25, #26 and #27 are finished I will do the review.
@kaerdsar You saved the redirect URLs in a char field. Do you know if the 255 character limitation is used when you don't specify it in the fields.Char definition? If the limitation exists we shouldn't use a char field for the old URLs. Instead of a char field we should use a relation field like one2many for them.
@kaerdsar i also figured out that if you move a menu page, which is a subpage to another page as a subpage, the SEO url does not change. Can you check it
@kaerdsar The error mentioned by @jholze in the comment before doesn't exist anymore. The redirection refactoring from a char field to an one2many field also works but there is one issue.You have to take into account the language into the redirection relation. Otherwise it is possible that you can call an english url and odoo redirects to the german url.
@rruebner I did some changes to avoid this. Anyway there is a case I think we don't need to fix. The first time you set a value to seo_url via Promote Panel for German language Odoo saves the same value for English and German, because in Odoo all default values are in English. To ensure that only exist value for German we would have to set False in English version. Because of this the first time you set a seo_url for German language you actually are setting the value for both languages (de, en) and when set value for English later you actually will be writing a new value. That's the reason you get a redirect for the first url.
I'm not sure if we need a way to avoid this. Also we can have an scenario in the backend to edit redirect URLs.
Description
If a SEO URL changes (automatically or manually) a 301 redirect to the new URL must be provided.
Reason
If we haven't a 301 redirect the old URL is no longer accessible and the user is redirected to a 404 page. In addition the article is available twice in the Google search engine which is bad. Result: the Google ranking for the website is decreased.
current behavior
When we change a URL, we must enter the 301 redirect manually.
expected behavior
When we change a URL in the backend odoo should automatically add a 301 redirect to the new URL.
related links
http://stackoverflow.com/questions/9130422/how-long-do-browsers-cache-http-301s