Prestashop: Keyword "{id}" required for route error after upgrade to 1.7.5

Created on 4 Jan 2019  路  28Comments  路  Source: PrestaShop/PrestaShop

After upgrading from 1.7.3.1 to 1.7.5.0 (latest) i cant save the SEO & URLs page (to recreate .htaccess), i always get this errors:

Keyword "{id}" required for route "xipblog-archive-wid-module" (rule: "blog/category/{rewrite}.html")
Keyword "{id}" required for route "xipblog-tag-wid-module" (rule: "blog/tag/{rewrite}.html")
Keyword "{id}" required for route "xipblog-single-wid-module" (rule: "blog/post/{rewrite}.html")

See atached screenshoot's.

Any ideas how to solve this?

seo_urls

1.7.3.1 1.7.5.0 BO Bug Can't Reproduce SEO & URLs

Most helpful comment

Ok i think i found the solution.
And yes is an theme error/bug/feature.
What i did:
Went to www.domain.commodules\xipblog (our theme blog module).
Edited xipblog.php.
For example i searched for xipblog-single-wid-module.
and in that array i changed:
'rule' =>$main_slug.'/'.$single_slug.'/{rewrite}'.$postfix_slug,
to
'rule' =>$main_slug.'/'.$single_slug.'/{id}-{rewrite}'.$postfix_slug,
No more errors on SEO & URLs page and it get saved ok.

Thanks to all for helping. Thanks @khouloudbelguith , thanks @rdy4ever
If anyone nedds more info don't hesitate to contact me.

Can be marked as solved.

All 28 comments

Hi @espacious,

Did you use the module blog block module?
Thanks!

I use the blog module provided with our theme. (XpertBlog)
The respective modules are:
Prestashop Blog Module by xpert-idea.com
Xpert Blog Display Posts on Home Page

disabling the modules have no effect, on 1.7.3.1 it's working as it should.
I can provide logs and other needed stuff.

The theme we use:
https://themeforest.net/item/volga-megashop-responsive-prestashop-17-theme/21055696

@espacious, in the SEO & URLs page, have you any pages created related to this blog module?
Thanks!

I have only 2 entries that have blog in name. See screens. I added manualy the Friendly URL, now i cant remove them but i think it has nothing to do.

seo_urls

@espacious, could you please try to re-create those two pages, if the issue occurs again, could you please enable the debug mode & display her the exception displayed if you have one.
Thanks!

@khouloudbelguith removing the two entries and save the SEO & URLs page gives me the same error.

Keyword "{id}" required for route "xipblog-archive-wid-module" (rule: "blog/category/{rewrite}.html")
Keyword "{id}" required for route "xipblog-tag-wid-module" (rule: "blog/tag/{rewrite}.html")
Keyword "{id}" required for route "xipblog-single-wid-module" (rule: "blog/post/{rewrite}.html")

After recreating those two entries (i had to put Friendly URL at least in EN, but after upgrading in first place the friendly url was empty, again i think it has nothing to do with our problem.) Just to know, if mi leave Friendly url empty i get:

The URL rewrite field must be filled in either the default or English language.

...so after recreating those two entries i still get the same error. (pages are created correctly but when i hit any save button on SEO & URLs page i get the error mentioned above.)

seo_urls

I also have already enabled Debug mode. But i cant find any clue. I have 7 (red) missing translation messages and 16 (orange) logs but all about Translations Warnings.

@espacious, I created manually a new SEO page with PS1.7.4.2, I made an upgrade from S1.7.4.2 to PS1.7.5.0, I check this page, the friendly is not empty in English & I did not manage to reproduce your issue.
We need to retrieve the PHP error log and the debug mode report in order to find out what's wrong.
Don't you know how to get this information? Please read the following article:
http://build.prestashop.com/howtos/misc/how-to-create-bug-report/

Thanks!

My shop was developed on prestashop 1.7.3.1 or eaven older. After updating many columns have an empty Friendly Url field. (as you can see on the screen above, same thing on 1.7.3.1 ver.) I see no problems when running 1.7.3.1, after updating to 1.7.5.0 as said SEO & URL's page does not get saved.

I will provide more logs ... thanks

@espacious, thanks!
Waiting for your feedback.

Keyword "{id}" required for route "xipblog-archive-wid-module" (rule: "blog/category/{rewrite}.html")
Keyword "{id}" required for route "xipblog-tag-wid-module" (rule: "blog/tag/{rewrite}.html")
Keyword "{id}" required for route "xipblog-single-wid-module" (rule: "blog/post/{rewrite}.html")

You need to add the {id} keyword to these routes as it is mandatory. Then try to save again.
For ex: modify blog/category/{rewrite}.html in blog/category/{id}-{rewrite}.html

Hi @khouloudbelguith,
thanks for the info but where to add this routes? In Schema of URLs i dont see such field (blog).

Hi @espacious,

In the SEO & URLs page, in the Schema of URLs part, you need to add the {id} keyword to these routes.
image
you need to add {id} to thoses rules: "blog/category/{rewrite}.html" , rule: "blog/tag/{rewrite}.html" , rule: "blog/post/{rewrite}.html"
Thanks!

Hi @khouloudbelguith,
as said i dont see any routes about blog. See atached screen.

Thanks for all the support.

bug

Hi @espacious,

Have you tried to contact the module author about this issue?
There are routes related to your module which they are not displayed.
Thanks!

Will do today if i find some time. Will also post some logs. Thanks

Hi @espacious,

Thanks!
Waiting for your feedback.

So to make it a bit more clear:

Steps to reproduce:
Install PS 1.7.3.1
Install Volga(1st layout) - MegaShop Responsive Prestashop 1.7 Theme
https://themeforest.net/item/volga-megashop-responsive-prestashop-17-theme/21055696
Update to 1.7.5.0
Go to SEO & URLs page and try to save, you will get:

Keyword "{id}" required for route "xipblog-archive-wid-module" (rule: "blog/category/{rewrite}.html")
Keyword "{id}" required for route "xipblog-tag-wid-module" (rule: "blog/tag/{rewrite}.html")
Keyword "{id}" required for route "xipblog-single-wid-module" (rule: "blog/post/{rewrite}.html")

PrestaShop version: 1.7.5.0
Current theme in use: theme_volga1_child
Server information Linux #1 SMP Mon Dec 17 11:06:40 EST 2018 x86_64
Server software version: Apache
PHP version: 7.0.33
Memory limit: 512M
Max execution time: 300
Upload Max File size: 128M

MySQL version: 5.6.42-cll-lve
MySQL server: 127.0.0.1
Tables prefix: ps_
MySQL engine: InnoDB
MySQL driver: DbPDO

Your web browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36

In php.error.log i have nothing
In access log the only related thing i found was:
-see attached file (can provide the whole log if necessary)
dev.domain.com-ssl_log-Jan-2019.txt

Cache is cleared, Debug Mode enabled, no errors or warnings except some missing translations.
Only thing i found in Debug mode related to SEO & URLs are those two:

1
2

I emailed also the theme developers.

Thanks for helping.

Hi @espacious,

Thanks for this clarifications.
As it's not the default theme, provided by Prestashop, we can't do anything with this.
You should contact the theme author via your addons.prestashop.com account, they are the only ones to help you with it.
Thanks!
I close the issue, feel free to open a new one when needed.

Hmm, now i found sth. intresting i think! Take a look at this screenshoot:
I think this is the problem but cant figure out where to change those values !? database?

bug

@espacious, you need to check if you have an override of the Dispatcher.php class, where you can find the rule for those blog.
Thanks!
By default, those rules are defined in the ProjetPrestaShop/classes/Dispatcher.php, for example the category rule => https://github.com/PrestaShop/PrestaShop/blob/develop/classes/Dispatcher.php#L56

Ok i think i found the solution.
And yes is an theme error/bug/feature.
What i did:
Went to www.domain.commodules\xipblog (our theme blog module).
Edited xipblog.php.
For example i searched for xipblog-single-wid-module.
and in that array i changed:
'rule' =>$main_slug.'/'.$single_slug.'/{rewrite}'.$postfix_slug,
to
'rule' =>$main_slug.'/'.$single_slug.'/{id}-{rewrite}'.$postfix_slug,
No more errors on SEO & URLs page and it get saved ok.

Thanks to all for helping. Thanks @khouloudbelguith , thanks @rdy4ever
If anyone nedds more info don't hesitate to contact me.

Can be marked as solved.

Thank you very much.
I had the same problem!!!
Everything is fine now!!!!!!!

Thank you. It also solved my issue.

I copied the file /modules/xipblog/xipblog.php and edited it at 3 places :

'xipblog-single-wid-module' => array(
                    'controller' =>  'single',
                    'rule' =>        $main_slug.'/'.$single_slug.'/{id}-{rewrite}'.$postfix_slug,
'xipblog-archive-wid-module' => array(
                    'controller' =>  'archive',
                    'rule' =>        $main_slug.'/'.$category_slug.'/{id}-{rewrite}'.$postfix_slug,
'xipblog-tag-wid-module' => array(
                    'controller' =>  'archive',
                    'rule' =>        $main_slug.'/'.$tag_slug.'/{id}-{rewrite}'.$postfix_slug,

then upload it on the server to overwrite the existing file (in my case, I use a child theme so it should be copied in the child theme and not in the modules/xipblog directory)

Great Thanks, solution is help!

Thank you very much.

Hello,
i have same problem, and i followed same process but still not working

here is my theme ttv_bigelectronics_213

Hi @Mokwa123,

As it's not the default theme, provided by Prestashop, we can't do anything with this.
You should contact the theme author via your addons.prestashop.com account, they are the only ones to help you with it.
Thanks!

Awesome, was able to fix this problem with these isntructions too!!!!

Was this page helpful?
0 / 5 - 0 ratings