Page 1 of 1

PrettyURL bug with Products module

Posted: Thu Nov 24, 2016 3:37 am
by caciavar
CMSMS Version: 2.1.5
Products Module Version: 2.25.3
Bug reported here: http://dev.cmsmadesimple.org/bug/view/11225

I'm not actually sure if this ever behaved as I would expect it to behave in any version of the Products module. This behaviour definitely goes back quite a few versions.

Description:
When URL rewriting is enabled, and the action is set to 'hierarchy' the summarytemplate parameter is not incorporated into the pretty URL.

Example 1 - Pretty URLs disabled:
{Products action='hierarchy' summarytemplate="summary2"}

When the above tag is used, the resulting URL from a hierarchy report will be:
http://www.myhost.com/index.php?mact=Pr ... eturnid=34

...which will link to the summary list with the appropriate summary template.

Example 2 - Pretty URLs enabled:
{Products action='hierarchy' summarytemplate="summary2"}

When the above tag is used, the resulting URL from a hierarchy report will be:
http://www.myhost.com/products/byhierarchy/1/34.html

...which will link to the summary list with the *default* summary template, ignoring the summary template parameter which specifies the template to be used for the (default) summary action.

Re: PrettyURL bug with Products module

Posted: Mon Dec 19, 2016 8:05 pm
by chrisbt
Should the parameter be 'hierarchytemplate' instead of 'summarytemplate'?

{Products action='hierarchy' hierarchytemplate="hierarchy2"}

Re: PrettyURL bug with Products module

Posted: Mon Dec 19, 2016 8:27 pm
by caciavar
By omitting the "hierarchytemplate" parameter it will use the default hierarchy template. But yes, that parameter can also be used.

What I'm referring to is that there is a need to specify which summary template is used when you "drill-down" to a summary page (that uses a summary template) from a hierarchy page (which uses a hierarchy template).

Re: PrettyURL bug with Products module

Posted: Mon Dec 19, 2016 8:31 pm
by chrisbt
Ok - thanks :)