smartdatasoft / smartblog

SmartBlog is one of the most powerful PrestaShop blog module .Prestashop 1.6 & 1.7 Smart Blog Module
https://classydevs.com
Academic Free License v3.0
93 stars 82 forks source link

Regex problem in hookModuleRoutes #30

Closed Sladix closed 6 years ago

Sladix commented 8 years ago

Hi,

I Installed the latest version of smartblog (2.1) on the latest version of prestashop (1.6.1.4) and I had some problems with the seo friendly urls.

I checked out the regex in smartblog.php and found out that the regex used to grab the post id is the following :

'id_post' => array('regexp' => '[_a-zA-Z0-9-\pL]*', 'param' => 'id_post'),

But when I test it in some regex test tools like this one with the default blog post url which is /4_share_the_love_for_prestashop_1_6, the value of id_post is 4_share_the_love_for_prestashop_1_6

I changed the regex by [0-9]* and now it works fine. I did the same things for smartblog_category, smartblog_category_pagination and smartblog_cat_page_mod

smartdatasoft commented 6 years ago

It was fixed. can you check