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 AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

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

Rank: Advanced Member

Groups: HelpDesk, Developers
Joined: 11/9/2018(UTC)
Posts: 564

Thanks: 122 times
Was thanked: 26 time(s) in 25 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. New Registrations are disabled.

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: 175

Thanks: 8 times
Was thanked: 17 time(s) in 15 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 Payne2  
#3 Posted : Friday, January 22, 2021 9:44:30 AM(UTC)
Joe Payne2

Rank: Advanced Member

Groups: HelpDesk, Developers
Joined: 11/9/2018(UTC)
Posts: 564

Thanks: 122 times
Was thanked: 26 time(s) in 25 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: 175

Thanks: 8 times
Was thanked: 17 time(s) in 15 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.
Joe Payne2  
#5 Posted : Wednesday, June 2, 2021 1:35:22 PM(UTC)
Joe Payne2

Rank: Advanced Member

Groups: HelpDesk, Developers
Joined: 11/9/2018(UTC)
Posts: 564

Thanks: 122 times
Was thanked: 26 time(s) in 25 post(s)
FYI I'm just now trying to approach this problem. I have some concerns.

Adjusting the field sizes in the table creates a new problem with SQL indexes.

In SQL 2014, there is a 900 byte limit on index size. So I cannot adjust the table column loweredUrl beyond nvarchar(450) because the associated index will exceed 900 bytes in size.

What's worse, is that 900 byte limit changes depending on which flavor of SQL Server you're using. For example, SQL 2016 supports up to 1,700 bytes.

So increasing the field size in the table also commits the application to compatibility only with specific versions of SQL Server.


The result is I can update the column size, to a point. But there are multiples issues I see:

1. I cannot know for certain if any urls remain truncated. It appears to be a manual process of scanning through 7,000+ records which isn't going to go over well with the client.

2. I have blown through the maxUrl default in IIS itself and must modify web.config to increase it.

3. The resulting urls for this particular catalog are insanely large due to including the entire catalog tree path with the product name. While on paper this idea might have made sense, in the real world the category names are much longer than "Dogs", "Cats" and "Toys" and category trees go much deeper than two levels.



Is there a way to turn this new url structure off and keep using the original urls we had in Able Gold?
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.