|
This post was updated on .
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 + "-", ""); Patch File : productCategoryUrl.ofbiz.12.04.patch
-------------------------------------------------
'There are two choices in life-Take it or leave it !' ------------------------------------------------- |
|
Administrator
|
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" <[hidden email]> > 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. |
|
Administrator
|
In reply to this post by rshekhar.in
I guess I missed your point, please give more information in a Jira, like the exemple you used, maybe the missing data, etc.
I'm tired to get things by my own Jacques Jacques Le Roux wrote: > 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" <[hidden email]> >> 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. |
|
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 !' ------------------------------------------------- |
|
Administrator
|
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" <[hidden email]> >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. |
| Free forum by Nabble | Edit this page |
