Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Colin Wiseman 52 posts 194 karma points
    Dec 09, 2021 @ 16:14
    Colin Wiseman
    0

    Redirect stopped working

    We have been using the SEO checker successfully for a while now. Our client has added in a tonne of redirects. But just recently something has broken and we don't know why.

    With a copy of my client's site locally, the redirects don't work, even using localhost.

    But with a clean copy of Umbraco 8.6.1 the same version as my client, and a clean version of SEOChecker, the redirects work perfectly.

    So I unintsalled SEOChecker on my client's site, deleted plugin files, dlls etc. and reinstalled as a fresh copy, and it is still not working.

    Is there something you could point me towards to help us figure out why the redirects would all of a sudden stop working? e.g. I really should disable Umbraco's built in redirects.

    Any help would be appreciated!

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Dec 10, 2021 @ 07:55
    Richard Soeteman
    0

    Hi

    Best not to -re-install etc to fix this. I think either an inbound link error, or ignored inbound link error cause the issue. Check if the redirect that is failing exists in one of those overviews and remove from there.

    Hope this helps,

    Richard

  • Colin Wiseman 52 posts 194 karma points
    Dec 10, 2021 @ 08:38
    Colin Wiseman
    0

    All of the redirects no longer work. It's not a specific redirect.

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Dec 10, 2021 @ 08:41
    Richard Soeteman
    0

    Did you disable the redirect module in settings?

  • Colin Wiseman 52 posts 194 karma points
    Dec 10, 2021 @ 08:46
    Colin Wiseman
    0

    Good question. I inherited the project last week :D

    I did disable the Url Tracker via the UI in Umbraco 8 to no affect, but if you are saying there is a "redirect module in settings":

    Do you mean system.webServer > rewrite rules?

    Or do you mean "disableRedirectUrlTracking="false""?

    Colin

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Dec 10, 2021 @ 08:48
    Richard Soeteman
    0

    No I mean in SEOChecker go to the general settings and see if redirect manager is turned off.

  • Colin Wiseman 52 posts 194 karma points
    Dec 10, 2021 @ 08:56
    Colin Wiseman
    0

    Redirect settings: 1. Enable redirect module - tick 2. Track url history - tick 3. Store domain for not found urls - not ticked 4. Store querystring for not found urls - not ticked 5. Forward querystring - ticked 6. Redirect when node exists - not ticked

    The entry I am testing with:

    /ordering

    the node doesn't exist, and it falls to a 404 page but it should be redirecting to /support/ordering.

    The site is a multi lingual site, if that might make a difference, but with my testing on another site, the multi lingual stuff worked beautifully! (Amazing work by the way! Thank you!!)

    Your point on the configuration leads me into the Log Viewer:

    SEOChecker: SEOChecker: Error during validating Configuration
    System.NullReferenceException: Object reference not set to an instance of an object.
       at SEOChecker.Core.Umbraco.DocumentWrappers.UmbracoDocumentBase.<>c__DisplayClass4_0`1.<GetPropertyValue>b__1(DocumentProperty p)
       at System.Linq.Enumerable.WhereListIterator`1.MoveNext()
       at System.Linq.Enumerable.Count[TSource](IEnumerable`1 source)
       at SEOChecker.Core.Umbraco.DocumentWrappers.UmbracoDocumentBase.GetPropertyValue[T](String propertyAlias, Boolean recursive, String culture, String segment)
       at SEOChecker.Core.Umbraco.DocumentWrappers.UmbracoDocument..ctor(IContent doc, IContextInfo info, String culture, String segment)
       at SEOChecker.Core.Helpers.UmbracoDocumentHelper.GetFirstPublishedChildNode(IContextInfo contextInfo, String culture, String segment)
       at SEOChecker.Validators.ConfigurationValidators.TrailingSlashValidator.SEOChecker.Extensions.Validation.ConfigurationValidation.IConfigurationValidator.Parse(List`1 result, IContextInfo contextInfo)
       at SEOChecker.Core.Validation.ConfigurationValidators.ConfigurationValidator.Validate()
    
    SourceContext   SEOChecker.Core.Validation.ConfigurationValidators.ConfigurationValidator 
    

    So it reads like there is an error with configuration but I cannot see where and what precisely is wrong.

  • Colin Wiseman 52 posts 194 karma points
    Dec 10, 2021 @ 09:34
    Colin Wiseman
    0
    <package id="SEOChecker" version="2.9.5" targetFramework="net472" />
    

    Could maybe an update be helpful in this circumstance?

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Dec 10, 2021 @ 09:53
    Richard Soeteman
    0

    The ConfigurationError comes from the ConfigurationIssuesOverview. Also interesting and shoudl be catched but should not cause any redirect issues. If it's caused by this database only then an invalid redirect could exists in the database. Not any errors related to seochcheckerpagenot found table?

    About to go offiline but will reply on monday.

    Best,

    Richard

  • Colin Wiseman 52 posts 194 karma points
    Dec 10, 2021 @ 10:18
    Colin Wiseman
    0

    seochcheckerpagenot - no errors in the logs for that.

  • Colin Wiseman 52 posts 194 karma points
    Dec 10, 2021 @ 10:18
    Colin Wiseman
    0

    If you haven't gone, where are the Urls stored in the database?

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Dec 13, 2021 @ 07:57
    Richard Soeteman
    0

    Url's are stored in SEOChecker_PageNotFound table

  • Andreas Kristensen 71 posts 285 karma points c-trib
    Dec 10, 2021 @ 13:37
    Andreas Kristensen
    0

    +1 on this.

    I just found out that renaming a page does not create a redirect. All the configuration seems right, so I am scratching my hair. I also have the same configuration error in my log.

    I also had a look in the log of one of the sites that does not work, and I think I have found a related error message. Are you seeing something similar Colin? (Actual "sitename" removed for privacy)

    System.Data.SqlClient.SqlException (0x80131904): String or binary data would be truncated in table 'cxgtafbfvyd.dbo.SEOChecker_PageNotFound', column 'Url'. Truncated value: '&data=04%7C01%[email protected]%7C75f1733f41ad4dfb505408d90577a0b2%7Ca0898660117a4c92af2f0042067055bc'.
    
    The statement has been terminated.
    
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
    
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
    
       at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
    
       at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
    
       at System.Data.SqlClient.SqlDataReader.get_MetaData()
    
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
    
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
    
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
    
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
    
       at System.Data.SqlClient.SqlCommand.ExecuteScalar()
    
       at NPoco.Database.ExecuteScalarHelper(DbCommand cmd)
    
       at NPoco.Database.InsertImp[T](PocoData pocoData, String tableName, String primaryKeyName, Boolean autoIncrement, T poco)
    
       at NPoco.Database.Insert[T](String tableName, String primaryKeyName, Boolean autoIncrement, T poco)
    
       at NPoco.Database.Save[T](T poco)
    
       at SEOChecker.Core.Repository.PageNotFound.PageNotFoundRepository.Insert(Uri uri, Uri referer, Int32 documentId, String redirect, Boolean isNotFound, ContentTypeEnum contentType, Boolean storeDomain, Boolean wildCard, Boolean storeQueryString)
    
       at SEOChecker.Core.Repository.PageNotFound.PageNotFoundRepository.Insert(Uri uri, Uri referer, ContentTypeEnum contentType)
    
       at SEOChecker.Core.Components.UrlRedirectComponent.(Object , EventArgs )
    
    ClientConnectionId:00bdca18-626b-4730-92c3-60bf9bfbecf0
    
    Error Number:2628,State:1,Class:16
    

    Tested it on a couple of sites, both running Umbraco 8.13.1 and SeoChecker 2.10.1, on Umbraco Cloud. Also tested it locally, and that does not work either.

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Dec 13, 2021 @ 07:57
    Richard Soeteman
    0

    Can you try increase the url column length?

  • Andreas Kristensen 71 posts 285 karma points c-trib
    Dec 13, 2021 @ 09:34
    Andreas Kristensen
    100

    I just did that. Changed it to nvarchar(1000). The error seems to be gone now. But, I just tried to rename a node, and I get this error. And the old URL does not redirect. enter image description here

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Dec 14, 2021 @ 10:31
    Richard Soeteman
    0

    I just tried with the latest version 2.11.2 And don't see this issue. Can you try with the latest version as well?

    Best,

    Richard

  • Andreas Kristensen 71 posts 285 karma points c-trib
    Dec 14, 2021 @ 11:21
    Andreas Kristensen
    0

    I just triede installing the latest version. Still get the same error. Is there something special you have to do when upgrading from 2.10.1 to 2.11.2?

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Dec 16, 2021 @ 09:04
    Richard Soeteman
    0

    Weird,

    And is anything in the tree of this document unpublished maybe?

    Best,

    Richard

  • Andreas Kristensen 71 posts 285 karma points c-trib
    Dec 16, 2021 @ 09:32
    Andreas Kristensen
    0

    There is an unpublished variant in another language, on both the root that was renamed and it's child.

  • Colin Wiseman 52 posts 194 karma points
    Dec 16, 2021 @ 11:01
    Colin Wiseman
    0

    Yup. Upadting the Url column to nvarchar(1000) worked. I also updated the RedirectUrl column to nvarchar(1000) as I noticed that column was mostly empty albeit with 60k entries.

    I can't test the publishing of pages, or updating them as it's quite a controlled website (long story), but there are tonnes of other errors in the log view for SEO checker which doesn't feel healthy. The logs don't go back far as they are regular deleted, but 11 pages of just SEO Checker errors since the 9th December...

    But that's all for another day :-)

  • Andreas Kristensen 71 posts 285 karma points c-trib
    Dec 16, 2021 @ 11:05
    Andreas Kristensen
    0

    I only changed the Url column. Will try with also changing the RedirectUrl column.

    Edit: Tried that, did not help. Found the entry for the node i renamed in the PageNotFound table. Looks like this:

    NotFoundId  Url DocumentID  Ignore  TimesAccessed   LastTimeAccessed    RedirectUrl Referer ContentType Domain  QueryString WildCard
    3306    komponenttest   0   0   1   2021-12-16 12:38:58.523         Content         0
    

    No automatic redirect created, but no error to see in the log. This is local testing btw.

    Also, no redirects to see on the property editor on the node itself: enter image description here

  • Andreas Kristensen 71 posts 285 karma points c-trib
    Dec 21, 2021 @ 13:49
    Andreas Kristensen
    0

    Okay, for some reason, I am no longer able to provoque the error in the log. But it still doesnt work. When renaming a page, no redirect is created automatically.

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Dec 21, 2021 @ 14:42
    Richard Soeteman
    0

    2 things in one thread :-) Track url history still enabled in general settings?

  • Andreas Kristensen 71 posts 285 karma points c-trib
    Dec 21, 2021 @ 14:45
    Andreas Kristensen
    0

    Yes, it's enabled.

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Dec 21, 2021 @ 14:48
    Richard Soeteman
    0

    Weird, when the page get's published it should check the name in that case and create a redirect (or fail and the log an error)

  • Andreas Kristensen 71 posts 285 karma points c-trib
    Dec 21, 2021 @ 14:51
    Andreas Kristensen
    0

    I agree.

  • Colin Wiseman 52 posts 194 karma points
    Dec 22, 2021 @ 11:04
    Colin Wiseman
    0

    Unfortunately, although this was the fix, the redirects have stopped working again.

    When I don't have the "even if page exists" set, no redirects work. When I have "even if page exists" set, redirects that are in the table work (as expected) but the table is FULL of pages without a trailing slash redirecting to themselves with a trailing slash, but this causes "too many redirects" issue. So I have to have that set to off, in order to stop the too many redirects, and I have to set the Trailing Slash setting to on, in order to get the trailing slash in the Url. But that then breaks the pages that do exist but need to redirect, that are set in the Redirect manager.

    It feels like my client's site is a super edge case in all your logic, and I am not sure how to fix it.

    We also have multiple languages which is compounding the case.

  • Colin Wiseman 52 posts 194 karma points
    Dec 22, 2021 @ 11:23
    Colin Wiseman
    0

    One thing also I have noted, the "Validate SEO" button doesn't seem to do anything on any page. It only ever returns "[]" when I check in the Network tab in Chrome Tools.

    And this is in the error logs:

    "SEOChecker: SEOChecker: Document with Id '1293' and 1with url https://www.peakscientific.com/products/ could not be validated because of the exception 'The operation has timed out' on the page"

    A possible link that something isn't working well...?

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Dec 22, 2021 @ 11:28
    Richard Soeteman
    0

    Is this on all pages? Could be that an outgoing request can't be made.

  • Colin Wiseman 52 posts 194 karma points
    Dec 22, 2021 @ 12:56
    Colin Wiseman
    0

    Yes it is. I won't worry about that though here now.

    The redirect is absolutely not working and no errors in the logs to say why.

    I added "/jobby" to the Redirect Manager, to redirect to "http://www.google.co.uk". When I hit "/jobby" in the browser it does not redirect.

    https://www.peakscientific.com/jobby

    Help?!

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Dec 22, 2021 @ 14:10
    Richard Soeteman
    0

    In Inbound link errors is jobby logged? Otherwise in ignored inbound link errors?

  • Colin Wiseman 52 posts 194 karma points
    Dec 22, 2021 @ 14:49
    Colin Wiseman
    0

    I've disabled the Url Redirects in favour of the old school 301s in a redirect.config file until I can work out why this is happening.

    As an FYI:

    The PageNotFound table has ~40k entries in it, but only 2339 unique ones.

  • Colin Wiseman 52 posts 194 karma points
    Dec 22, 2021 @ 17:39
    Colin Wiseman
    0

    Turns out there are a couple of issues.

    One of which is code that was added before I got involved. I found a composition.SetContentLastChanceFinder

    By removing that I find the code works.

    But there is still the issue of Looping too many times when "trailing slash" is set to on and "redirect if node exists" because of database entries:

    Url                 Document ID
    /products           1234
    

    where 1234 is the Products page, and because it exists and because your code checks things by removing the first and last forward slash, it will cause a never ending loop.

    I am currently tidying up our database to remove those rows and duplicate entries as well.

    Tis fun.

    But the main redirect issue was someone else's code being applied after your content finder. Two worlds collided, almost rival nations.

  • Colin Wiseman 52 posts 194 karma points
    Dec 22, 2021 @ 17:51
    Colin Wiseman
    100

    I used the SEO Checker's API to GetAll redirects.

    From that I found all entries in the table that were essentially pointing to itself which causes the infinite loop when "even if node exists". I deleted them all.

    I then tidied up the duplicates where Url and DocumentId matched, removing all but one.

    My database table is half the size (still a lot of junk) but things are working correctly now.

    Thanks.

  • Colin Wiseman 52 posts 194 karma points
    Dec 22, 2021 @ 18:05
    Colin Wiseman
    0

    @Richard this is funny:

    https://our.umbraco.com/packages/website-utilities/seo-checker/feature-request/101390-lastchancecontentfinder#comment-317468

    Because yeah, First One Wins (or Last One In etc). But yeah, that nailed the problem.

Please Sign in or register to post replies

Write your reply to:

Draft