Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyword "{id}" required for route error after upgrade to 1.7.5 #12026

Closed
espacious opened this issue Jan 4, 2019 · 28 comments
Closed

Keyword "{id}" required for route error after upgrade to 1.7.5 #12026

espacious opened this issue Jan 4, 2019 · 28 comments
Labels
1.7.3.1 Affects versions 1.7.5.0 Affects versions BO Category: Back Office Bug Type: Bug Can't reproduce Resolution: issue closed because cannot be reproduced SEO & URLs Label: Which BO under menu is concerned

Comments

@espacious
Copy link

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

@khouloudbelguith
Copy link
Contributor

Hi @espacious,

Did you use the module blog block module?
Thanks!

@khouloudbelguith khouloudbelguith added Bug Type: Bug BO Category: Back Office NMI Status: issue needs more information SEO & URLs Label: Which BO under menu is concerned 1.7.5.0 Affects versions labels Jan 4, 2019
@espacious
Copy link
Author

espacious commented Jan 4, 2019

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

@khouloudbelguith
Copy link
Contributor

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

@espacious
Copy link
Author

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

@khouloudbelguith
Copy link
Contributor

@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!

@espacious
Copy link
Author

espacious commented Jan 4, 2019

@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.

@khouloudbelguith
Copy link
Contributor

@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!

@espacious
Copy link
Author

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

@khouloudbelguith
Copy link
Contributor

@espacious, thanks!
Waiting for your feedback.

@rdy4ever
Copy link
Contributor

rdy4ever commented Jan 4, 2019

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

@espacious
Copy link
Author

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

@khouloudbelguith
Copy link
Contributor

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!

@espacious
Copy link
Author

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

Thanks for all the support.

bug

@khouloudbelguith
Copy link
Contributor

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!

@espacious
Copy link
Author

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

@khouloudbelguith
Copy link
Contributor

Hi @espacious,

Thanks!
Waiting for your feedback.

@espacious
Copy link
Author

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.

@khouloudbelguith
Copy link
Contributor

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.

@khouloudbelguith khouloudbelguith added Can't reproduce Resolution: issue closed because cannot be reproduced 1.7.3.1 Affects versions and removed NMI Status: issue needs more information labels Jan 8, 2019
@espacious
Copy link
Author

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

@khouloudbelguith
Copy link
Contributor

@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

@espacious
Copy link
Author

espacious commented Jan 9, 2019

Ok i think i found the solution.
And yes is an theme error/bug/feature.
What i did:
Went to www.domain.com\modules\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.

@athigb
Copy link

athigb commented Apr 11, 2019

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

@svergeylen
Copy link

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)

@kirillkormilcev
Copy link

Great Thanks, solution is help!

@oguzn
Copy link

oguzn commented May 9, 2019

Thank you very much.

@Mokwa123
Copy link

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

here is my theme ttv_bigelectronics_213

@khouloudbelguith
Copy link
Contributor

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!

@surffari
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.7.3.1 Affects versions 1.7.5.0 Affects versions BO Category: Back Office Bug Type: Bug Can't reproduce Resolution: issue closed because cannot be reproduced SEO & URLs Label: Which BO under menu is concerned
Projects
None yet
Development

No branches or pull requests

9 participants