You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "rshekhar.in" <rs...@gmail.com> on 2012/06/14 14:15:39 UTC

Categories links not working in case of alternative URL if the category id is a single word.

Categories links not working in case of alternative URL if the category id is
a single word.

For example , when using
http://demo-trunk.ofbiz.apache.org/ecommerce/gismos-gismos-c

i.e. your alternative url is gismos and your product category id is gismos,
then it is not able to resolve the category id.

A patch is attached...

changed this line
/productCategoryStr = alternativeUrl.replace(textData + "-", "");/
to
/productCategoryStr = alternativeUrl.replaceFirst(textData + "-", "");/

--
View this message in context: http://ofbiz.135035.n4.nabble.com/Categories-links-not-working-in-case-of-alternative-URL-if-the-category-id-is-a-single-word-tp4633554.html
Sent from the OFBiz - Dev mailing list archive at Nabble.com.

Re: Categories links not working in case of alternative URL if the category id is a single word.

Posted by Jacques Le Roux <ja...@les7arts.com>.
Sorry Rshekhar,

I tried your change but it does not work
Also it would have been better to create a Jira for history sake, follow https://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Contributors+Best+Practices

Jacques

From: "rshekhar.in" <rs...@gmail.com>
> Categories links not working in case of alternative URL if the category id is
> a single word.
> 
> For example , when using
> http://demo-trunk.ofbiz.apache.org/ecommerce/gismos-gismos-c
> 
> i.e. your alternative url is gismos and your product category id is gismos,
> then it is not able to resolve the category id.
> 
> A patch is attached...
> 
> changed this line
> /productCategoryStr = alternativeUrl.replace(textData + "-", "");/
> to
> /productCategoryStr = alternativeUrl.replaceFirst(textData + "-", "");/
> 
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Categories-links-not-working-in-case-of-alternative-URL-if-the-category-id-is-a-single-word-tp4633554.html
> Sent from the OFBiz - Dev mailing list archive at Nabble.com.

Re: Categories links not working in case of alternative URL if the category id is a single word.

Posted by Jacques Le Roux <ja...@les7arts.com>.
Thanks for clarification Rshekhar,

Let me know explain what I expected from you:
1) Create a new Jira and attacha a patch there following https://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Contributors+Best+Practices
2) Add your data (export, then import) in the trunk demo and let me know ASAP when done (the data are destroyed each Europe morning around 7h30)

I will then be able to try on trunk and get your data to test and resolve locally

Thanks

Jacques

From: "rshekhar.in" <rs...@gmail.com>
>I apologize for not explaining myself.
> 
> I have created a new category with id "food" and with an alternative url of
> "food".
> 
> So the url generated by ofbiz is
> http://demo-trunk.ofbiz.apache.org/ecommerce/food-food-c , which is not
> parsed successfully.
> 
> However, if the code is changed as in OP, then it works. We face the same
> problem and that's why i reported it.

Re: Categories links not working in case of alternative URL if the category id is a single word.

Posted by "rshekhar.in" <rs...@gmail.com>.
I apologize for not explaining myself.

I have created a new category with id "food" and with an alternative url of
"food".

So the url generated by ofbiz is
http://demo-trunk.ofbiz.apache.org/ecommerce/food-food-c , which is not
parsed successfully.

However, if the code is changed as in OP, then it works. We face the same
problem and that's why i reported it.



-----
-------------------------------------------------
'There are two choices in life-Take it or leave it !'
-------------------------------------------------
--
View this message in context: http://ofbiz.135035.n4.nabble.com/Categories-links-not-working-in-case-of-alternative-URL-if-the-category-id-is-a-single-word-tp4633554p4637435.html
Sent from the OFBiz - Dev mailing list archive at Nabble.com.