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.
|
|
|
|
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?
|
|
|
|
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)
|
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
Rank: Advanced Member
Groups: Developers
Joined: 11/7/2018(UTC) Posts: 303
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
|
|
|
|
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.
|
|
|
|
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!
|
|
|
|
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?
|
|
|
|
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!
|
|
|
|
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.
Important Information:
The AbleCommerce Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close