logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to forums.ablecommerce.com. Please use your AbleCommerce username and password to Login. Forums Registration.

Notification

Icon
Error

Options
Go to last post Go to first unread
Joe Payne @ AbleMods LLC  
#1 Posted : Thursday, January 21, 2021 3:08:20 PM(UTC)
Joe Payne @ AbleMods LLC

Rank: Advanced Member

Groups: HelpDesk
Joined: 11/9/2018(UTC)
Posts: 155

Thanks: 43 times
Was thanked: 7 time(s) in 7 post(s)
I received hundreds of these errors during a test upgrade:

Quote:

The generated URL for category <some-category-name> is 365 characters which is too long.


The category name itself is only about 90 characters long. So why the discrepancy between 365 and 90?

We weren't aware of any url length limits in Able Gold. Why is this a problem now in AC9?

More importantly, are all these category urls now broken in the upgraded store?

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. Forums Registration.

mazhar  
#2 Posted : Friday, January 22, 2021 2:12:39 AM(UTC)
mazhar

Rank: Administration

Groups: Admin, Administrators, HelpDesk, System, Authorized User, Developers, Registered
Joined: 10/5/2018(UTC)
Posts: 164

Thanks: 7 times
Was thanked: 12 time(s) in 11 post(s)
In AC9 we are adding entire parent path of catalog item in its URL. For example, if there is a category C inside a category B which is under root category A. Then then the URL generated will be, A/B/C which means the resulting URL will be composed of all these category names and not just the last node.

Moreover, In gold we were not storing URLs in database because they were created dynamically. In AC9 we generate these URLs in advance and then keep them in Database and Cache them.

In order to generate lengthy URLs you will need to increase the size of ac_CatalogUrls.Url and ac_CatalogUrls.LoweredUrl fields and then rebuild the URLs from SEO -> Settings -> Rebuild Catalog URLs option.
Joe Payne @ AbleMods LLC  
#3 Posted : Friday, January 22, 2021 9:44:30 AM(UTC)
Joe Payne @ AbleMods LLC

Rank: Advanced Member

Groups: HelpDesk
Joined: 11/9/2018(UTC)
Posts: 155

Thanks: 43 times
Was thanked: 7 time(s) in 7 post(s)
OK thanks. Does the nHibernate mapping also need to change? It's hard-coded to 300 chars as well.

I guess that leaves the question of why it's so short to begin with? A 1,000 character url is still perfectly valid so far as I know.
mazhar  
#4 Posted : Friday, January 22, 2021 10:20:26 AM(UTC)
mazhar

Rank: Administration

Groups: Admin, Administrators, HelpDesk, System, Authorized User, Developers, Registered
Joined: 10/5/2018(UTC)
Posts: 164

Thanks: 7 times
Was thanked: 12 time(s) in 11 post(s)
Quote:
OK thanks. Does the nHibernate mapping also need to change? It's hard-coded to 300 chars as well.

No, you don't need to adjust Nhibernate mappings. The coded 300 in hbm will be used if you generate SQL schema through nhibernate schema export. It doesn't put any limit to input for 300 characters.

Quote:
I guess that leaves the question of why it's so short to begin with? A 1,000 character url is still perfectly valid so far as I know.

This is sort of inherited from previous version. We used to generate short URLs under 300 characters in gold and custom URLs were kept with same limit in mind. Its still not common to run into URLs greater then 300 characters but we have plans to address the character limit.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.