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
sweeperqb  
#1 Posted : Monday, June 28, 2021 3:17:48 PM(UTC)
sweeperqb

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 5/30/2020(UTC)
Posts: 125

Thanks: 14 times
Was thanked: 3 time(s) in 3 post(s)
If you enable the "Search All Content" option for the site and then perform a search, you are presented with product results and a link in the upper-right corner of the search results page to Search Articles. When you click on that link, it returns a list of webpages containing your search term. However, all of the links are broken. Instead of using the friendly URL, they all point to something like /Webpage/Index/4?CategoryId=3 which, for whatever reason, cannot be found.

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

shaharyar  
#2 Posted : Tuesday, June 29, 2021 1:14:58 AM(UTC)
shaharyar

Rank: Advanced Member

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

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
I am unable to reproduce the issue. Can you please mention which version of AC9 you are using?
sweeperqb  
#3 Posted : Tuesday, June 29, 2021 2:10:04 AM(UTC)
sweeperqb

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 5/30/2020(UTC)
Posts: 125

Thanks: 14 times
Was thanked: 3 time(s) in 3 post(s)
9.0.4
sweeperqb  
#4 Posted : Tuesday, June 29, 2021 2:13:38 AM(UTC)
sweeperqb

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 5/30/2020(UTC)
Posts: 125

Thanks: 14 times
Was thanked: 3 time(s) in 3 post(s)
Also, not sure if it helps or not, but this site is being migrated from AbleCommerce 7. The pages returned in the results were all created in AC7, and I haven't modified any of them in the AC9 admin.
shaharyar  
#5 Posted : Tuesday, June 29, 2021 4:51:21 AM(UTC)
shaharyar

Rank: Advanced Member

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

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Can you confirm from the admin Edit Content Page for the pages that you are getting invalid navigate URLs?
You need to confirm that the issue is only with Search Articles page or do we have invalid Urls stored in the database..

After the upgrade, the URLs should be regenerated using the category structure.
judy at Web2Market  
#6 Posted : Wednesday, June 30, 2021 6:06:33 AM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 289

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
I didn't even know that feature was there! I tested on a dev site that was upgraded from a Gold R12 sites and all the links are valid. Do you have Page Urls entered for those webpages?

Edited by user Wednesday, June 30, 2021 6:07:05 AM(UTC)  | Reason: Not specified

sweeperqb  
#7 Posted : Wednesday, June 30, 2021 9:31:11 AM(UTC)
sweeperqb

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 5/30/2020(UTC)
Posts: 125

Thanks: 14 times
Was thanked: 3 time(s) in 3 post(s)
After further review, the friendly Page URLs were not automatically created for Content Pages during the install when updating from AC 7.0.7 to a clean install of AC 9.0.4. There were no errors or info messages during install. Friendly URLs were properly generated for products and categories, so I suspect this to be a bug or deficiency in the upgrade process.

The "Page Not Found" for content page search results was a red herring. When I did a preview of an existing content page from the admin, the URLs formatted like /Webpage/Index/4?CategoryId=3 resolved properly. Turns out that the WebpageController.SearchResults method is creating an absolute URL for the results. The method used for that relies on the Store URL which was set to http instead of https in my installation for some reason. Since I'm using Visual Studio's embedded server, it has two separate ports that have to be used when switching between HTTP protocols. It was trying to connect via http to the https port which resulted in an error. I was able to resolve that error by updating the Store URL in the System Settings.

Is there a way for us to retroactively auto-generate Page URLs for Content Pages? On the current site there are almost 100 content pages. On our largest website, there are hundreds of them. Would be a ton of work to go into every page and do it manually.




shaharyar  
#8 Posted : Thursday, July 1, 2021 4:33:46 AM(UTC)
shaharyar

Rank: Advanced Member

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

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Quote:
Is there a way for us to retroactively auto-generate Page URLs for Content Pages? On the current site, there are almost 100 content pages. On our largest website, there are hundreds of them. Would be a ton of work to go into every page and do it manually.


We have already logged an issue related to this issue. Hopefully, this will be fixed in the next release.

Thanks for pointing this out!
sweeperqb  
#9 Posted : Monday, July 19, 2021 3:39:56 PM(UTC)
sweeperqb

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 5/30/2020(UTC)
Posts: 125

Thanks: 14 times
Was thanked: 3 time(s) in 3 post(s)
It would be very painful for us to manually go back and create URLs for all of the webpages, so we went into the CommerceBuilder source, copied the method to create URLs for Products, and updated it to create them for Webpages. We literally took the GenerateProductUrls method and performed replacements "Product" => "Webpage" and "product" => "webpage", and added a simple if/continue check to ignore system generated pages.

It generated friendly URLS, however, it didn't take category path into account like it does for products. It just generated a URL for the root of the website. Any thoughts on how to generate the webpage urls so that they contain the parent category/categories?
shaharyar  
#10 Posted : Monday, July 26, 2021 10:41:17 AM(UTC)
shaharyar

Rank: Advanced Member

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

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
I think you also need to look into this function.
1- Open \CommerceBuilder\Catalog\DefaultUrlGenerator.cs
2- See function with definition
Code:
public virtual string GetBrowseUrl(int categoryId, int nodeId, CatalogNodeType nodeType, string name)


I think GetCategoryURLSlug function is missing in Webpage case.

Hope this helps!
Users browsing this topic
Guest
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.