Copied to clipboard

Flag this post as spam?

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


  • Gregory 38 posts 128 karma points
    Aug 27, 2018 @ 15:54
    Gregory
    0

    SEO Checker on Cloud - Schedule errors and local environment not working

    Hi there,

    We are looking into getting SEO checker on our site which is currently using Umbraco Cloud.

    It seems we are getting an insane amount of error related to 'schedule tasks' and for some reason the field do not map on anything other than the title tag on our templates.

    SEOChecker: SEOChecker: Error running scheduled task
    
    
    Exception:
    System.Net.WebException: The remote server returned an error: (401) Unauthorized.
       at System.Net.HttpWebRequest.GetResponse()
       at SEOChecker.Core.Helpers.Request.ParseUrl(String url, Boolean allowRedirect, String method, Int32 timeOut)
       at SEOChecker.HttpModules.ValidationqueueModule.TimerCallback(Object sender)
    

    Additionally we are unable to do anything in within a local environment as we keep getting the following every time we save any content:

    Server error: Contact administrator, see log for full details.
    Object reference not set to an instance of an object.
    

    The log showing the following:

    2018-08-27 15:51:24,823 [P51244/D2/T8] ERROR SEOChecker.HttpModules.UrlModule - SEOChecker: SEOChecker: Error in HttpModule for url rewriting
    

    Finally, as mentioned earlier, we are unable to get the SEO check fields to map to existing fields. It does not seem to recognised anything other than the 'title' tag in our template.

    Apologies if I fired a lot of issues in one post, but any help or pointers as to how to get this plugin working smoothly would be much appreciated.

    Thanks,

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Aug 30, 2018 @ 07:02
    Richard Soeteman
    1

    Hi,

    Make sure you have the following handler configured in web.config. Strange that the installer didn't do this.

    <add name="SEOCheckerScheduler" type="SEOChecker.Handlers.HttpHandlers.SchedulerHandler" path="seocheckerscheduler.txt" preCondition="integratedMode" verb="*" />
    

    I also have a hotfix for the null error issues. Seems that Umbraco Context is gone in some situations. This release will be offcial out next week but if you want a fix now you can download from https://www.dropbox.com/s/177cuss83qc58cz/seo-checker21_0.zip?dl=0

    Hope this helps,

    Richard

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Aug 30, 2018 @ 07:06
    Richard Soeteman
    0

    Oh sorry, the 401 issue is a different one. You need to either whitelist the IP address on Umbraco cloud or additionally you can set the following web.config settings. membername and passwords requires credentials where you normally can login on cloud environment.

    Add the following info to the appSettings section of your web.config

      <!--SEO Checker settings-->
        <add key="SEOCheckerConnectAsUmbracoMember" value="true"/>
        <add key="SEOCheckerUmbracoMemberName" value="richard"/>
        <add key="SEOCheckerUmbracoMemberPassword" value="my secrect password"/>
    
  • Gregory 38 posts 128 karma points
    Aug 31, 2018 @ 09:25
    Gregory
    0

    Hi Richard,

    Thanks for the reply,

    The handler is already in the web config and your download link isn't working unfortunately.

    The 401 issue seems to have resolved itself... I don't believe I have done anything different... but this has now caused the SEO Scheduler to run every few seconds even though nothing is really happening. Is that normal behaviour?

    Anyway, I have cloned a fresh repository and tried again from scratch in order to avoid any similar issue going forward.

    ...still getting issues which are preventing us to use any of the features. Issues are as follow:

    • SEO Checker keep telling me there is no Meta Description tag in my template, or keyword meta tag. It only seems to map to the title> tag but nothing else. I have tried on a new clean site using basic templates with no success.

    • The redirect manager seems to create a new redirect duplication every time I save the page in the backoffice (although a new redirect entry appears on the redirect data type, I do not believe more redirects are actually created)

    • Robots do not seem to map on anything or even affect the page at present.

    Due to those issues we aren't able to use any of the SEO Checker functionality. Is this compatible with the cloud version of Umbraco?

    For info, I am on Umbraco 7.10.4 (Cloud) currently working in Localhost (avoiding any work on any other environment for now to avoid any issue.)

    Any help is much appreciated.

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Sep 03, 2018 @ 06:12
    Richard Soeteman
    0

    Hi With SEO Checker you can use the follwoing snipet to render all meta tags

    @{
    var meta = Model.Content.GetPropertyValue<SEOChecker.MVC.MetaData>("seoChecker");
    }
    @meta.AllTags
    

    When pagename changes in the backoffice it will create redirects indeed, With the Version coming out later today it is possible to disable this.

    It is needed indeed that the scheduler is hit everyu x seconds this checks the validation queue

    Don't know what you meanu with the robots issue But if you use the snippet above it will use the robots settings on the configured document type and you can use the robots data type to override this for a single page.

    Best,

    Richard

  • Gregory 38 posts 128 karma points
    Sep 03, 2018 @ 11:11
    Gregory
    0

    Thanks Richard, that helped a lot!

    Nearly there as the only issue that now remains is the redirect. No matter if there is a change on the page (page name or any field for that matter) a new redirect is created...

    As an example here is my homepage redirects:

    enter image description here

    I then hit SAVE and the following appears...

    enter image description here

    Every Time I save, a new redirect appears... Is there any way to sort that?

    Finally, one more question, the canonical URL setting via the SEO checker tab requires to enter a URL, can this be changed to a content tree picker where we select the page without having to type a URL? (this is more of a convenience thing rather than an issue, we can live with this as it is if it isn't a change that can be done)

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Sep 03, 2018 @ 11:17
    Richard Soeteman
    0

    Can you send me a copy of the entry in the SEOChecker_PageNotFound database table?

  • Gregory 38 posts 128 karma points
    Sep 03, 2018 @ 12:42
    Gregory
    0

    Richard,

    Here is the entry in the table:

    enter image description here

    There are a couple more entries for the blank redirect as well (with the same content ID)

    enter image description here

    enter image description here

    EDIT: After checking the full table, it seems there are ~10 instances of each redirect in the table.

  • Gregory 38 posts 128 karma points
    Sep 03, 2018 @ 13:05
    Gregory
    0

    Just throwing this out there at the same time as the DEV environment now throws the following issue:

    enter image description here

    Log file reads as follow:

        2018-09-03 13:00:56,083 [P5776/D8/T6] ERROR SEOChecker.Core.Validation.DocumentValidator - SEOChecker: SEOChecker: Error when validation document 
    System.ArgumentNullException: Value cannot be null.
    Parameter name: stream
       at System.IO.StreamReader..ctor(Stream stream, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean leaveOpen)
       at System.IO.StreamReader..ctor(Stream stream, Encoding encoding)
       at SEOChecker.Core.Validation.DocumentValidator.Validate(Int32 documentId, IContextInfo context)
    
  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Sep 03, 2018 @ 13:09
    Richard Soeteman
    0

    This is fixed in the release this afternoon, I am pretty sure redirects are also not created anymore with that release since it checks for empty values now

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Sep 03, 2018 @ 11:19
    Richard Soeteman
    0

    Oh and canonical domain is just the domain. not a picker It will make sure all urls get a canonical domain with the correct url.

  • Gregory 38 posts 128 karma points
    Sep 03, 2018 @ 12:42
    Gregory
    0

    Ok, that's fine then :) We can live with that.

  • Gregory 38 posts 128 karma points
    Sep 03, 2018 @ 14:52
    Gregory
    0

    Richard,

    Updated to 2.1 and disabled URL tracking. Duplicate redirect no longer show!

    I only really now have a single issue.. which I am hoping is a simple one...

    Everything seems to work in local (funny as originally nothing was working in local!)... but not on Dev where the following occurs...

    enter image description here

    I white listed my IP as you originally requested but the 401 issue is back in addition to another problem...

    Log file reads as follow... :

          2018-09-03 14:50:52,040 [P4924/D17/T29] ERROR SEOChecker.Core.Helpers.Request - SEOChecker: SEOChecker: Error could not load url 
    System.Net.WebException: The remote server returned an error: (401) Unauthorized.
       at System.Net.HttpWebRequest.GetResponse()
       at SEOChecker.Core.Helpers.Request.GetStream(String url, HttpCookieCollection cookies, String userAgent)
     2018-09-03 14:50:52,041 [P4924/D17/T29] ERROR SEOChecker.Core.Validation.DocumentValidator - SEOChecker: SEOChecker: Error when validation document 
    System.ArgumentNullException: Value cannot be null.
    Parameter name: stream
       at System.IO.StreamReader..ctor(Stream stream, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean leaveOpen)
       at System.IO.StreamReader..ctor(Stream stream, Encoding encoding)
       at SEOChecker.Core.Validation.DocumentValidator.Validate(Int32 documentId, IContextInfo context)
    
  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Sep 04, 2018 @ 07:58
    Richard Soeteman
    0

    Hi,

    Think Ip address changed. The following should also work

    For authenticated requests there is an option in SEOChecker

    Add the following info to the appSettings section of your web.config

      <!--SEO Checker settings-->
        <add key="SEOCheckerConnectAsUmbracoMember" value="true"/>
        <add key="SEOCheckerUmbracoMemberName" value="richard"/>
        <add key="SEOCheckerUmbracoMemberPassword" value="my secrect password"/>
    

    When SEOCheckerConnectAsUmbracoMember is true it will be using the name and password to login to the site.

    Hope this helps,

    Richard

  • Gregory 38 posts 128 karma points
    Sep 04, 2018 @ 09:29
    Gregory
    0

    Thanks,

    Are the username and password the credentials to login to the Umbraco Cloud environment?

    I keep getting...

     2018-09-04 09:27:45,285 [P5960/D4/T14] INFO  Umbraco.Core.Security.UmbracoMembershipProviderBase - Login attempt failed for username XXX from IP address XXX, the user does not exist
    
  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Sep 04, 2018 @ 09:31
    Richard Soeteman
    0

    yes that worked before...

  • Gregory 38 posts 128 karma points
    Sep 04, 2018 @ 09:43
    Gregory
    0

    Doesnt seem to work.

    Everything works in localhost.

    I add the credentials config lines as you mentioned (using my umbraco cloud login details) and no matter what I get the following on the dev environment:

    2018-09-04 09:39:13,313 [P4236/D4/T16] ERROR SEOChecker.HttpModules.ValidationqueueModule - SEOChecker: SEOChecker: SEOChecker Scheduled task Handler https://xxx/seocheckerscheduler.txt not configured, see manual
    System.Net.WebException: The remote server returned an error: (401) Unauthorized.
       at System.Net.HttpWebRequest.GetResponse()
       at SEOChecker.Core.Helpers.Request.ParseUrl(String url, Boolean allowRedirect, String method, Int32 timeOut)
       at SEOChecker.HttpModules.ValidationqueueModule.TimerCallback(Object sender)
     2018-09-04 09:39:13,440 [P4236/D4/T17] INFO  umbraco.BusinessLogic.Log - Log scrubbed.  Removed all items older than 2018-09-03 09:39:13
     2018-09-04 09:39:13,442 [P4236/D4/T16] INFO  Umbraco.Core.Sync.ApplicationUrlHelper - New ApplicationUrl detected: xxx
     2018-09-04 09:39:13,442 [P4236/D4/T16] INFO  Umbraco.Core.Sync.ApplicationUrlHelper - ApplicationUrl: xxx (UmbracoModule request)
     2018-09-04 09:39:31,506 [P4236/D4/T11] INFO  Umbraco.Core.Security.UmbracoMembershipProviderBase - Login attempt failed for username XXXX from IP address XXXX, the user does not exist
     2018-09-04 09:39:31,507 [P4236/D4/T11] ERROR SEOChecker.Core.Helpers.Request - SEOChecker: SEOChecker: Could not Authenticate the configured member for url xxx 
    SEOChecker.Core.Exceptions.MemberAuthenticationException: Error validating member, check app settings
       at SEOChecker.Core.Extensions.HttpWebRequestExtensions.AddAuthenticationCookie(HttpWebRequest request, String url)
       at SEOChecker.Core.Helpers.Request.GetStream(String url, HttpCookieCollection cookies, String userAgent)
     2018-09-04 09:39:31,507 [P4236/D4/T11] ERROR SEOChecker.Core.Validation.DocumentValidator - SEOChecker: SEOChecker: Error when validation document 
    System.ArgumentNullException: Value cannot be null.
    Parameter name: stream
       at System.IO.StreamReader..ctor(Stream stream, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean leaveOpen)
       at System.IO.StreamReader..ctor(Stream stream, Encoding encoding)
       at SEOChecker.Core.Validation.DocumentValidator.Validate(Int32 documentId, IContextInfo context)
    

    ...which obviously still bring me the error as follow in the back office when validating:

    enter image description here

    Either I am doing something wrong (most likely!) or something isn't quite right here...

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Sep 04, 2018 @ 09:49
    Richard Soeteman
    0

    Could be both :-( Think the server can't create the request anymore and that's a whitleist thing, maybe IP is changed again? . And Indeed the scheduler needs some improvmenent as well since that isn't using the authenticated request I am affraid

  • Gregory 38 posts 128 karma points
    Sep 04, 2018 @ 09:57
    Gregory
    0

    Just rechecked and the IP is correct and white listed.

    Anything else you could suggest?

    Is it possible to disable the validation altogether and the scheduler so there are no errors popping up anymore? (at a config level)

    I mean the validation is nice in the back office but we are using other tools to do it anyway, and I guess no validation would mean to need to have any validation queue.

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Sep 04, 2018 @ 10:01
    Richard Soeteman
    0

    Yeah just remove the scheduler from web.config

  • Gregory 38 posts 128 karma points
    Sep 05, 2018 @ 10:46
    Gregory
    0

    Richard,

    As far as I can see, everything is working fine for now! Thank a lot.

    I have one more question, is there any way to output meta tags individually (not using meta.allTags) in the templates?

    I believe the SEO Checker doc shows how to output some fields, but not all of them such as the Social tags.. (appId, and so on) and I don't know the aliases for those in order to call them in the template.

  • Gregory 38 posts 128 karma points
    Sep 04, 2018 @ 10:52
    Gregory
    0

    Cool, I ll go with that for now.

    Thanks a lot for the help :)

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Sep 06, 2018 @ 08:02
    Richard Soeteman
    0

    You can use

    meta.SocialTags for the social tags. currently it's rendering al;l tags at once.

    Best,

    Richard

Please Sign in or register to post replies

Write your reply to:

Draft