Skip to main content


Showing posts from 2020

Fix for Umbraco GetCurrentMember System.InvalidOperationException: No member object found

It is possible that you don't store your member data in Umbraco database any longer and you have got an external service that provides your member data, so that your web users can login to your website using this external service. If this is the case then you might see the following error happening in the background which is also causing some performance issues. An error occurred in GetCurrentMember. System.InvalidOperationException: No member object found with username [email protected] at umbraco.cms.businesslogic.member.Member.GetCurrentMember() This exception is most likely happening due to your project references to built in Umbraco membership provider, hence first step should be checking your Umbraco project's Web.config for  UmbracoMembershipProvider.  If the setting is similar to the following, then this is the reason that you see these exceptions. In that case, follow the 3 steps below to fix this problem. <add name="UmbracoMembershipProvider" type=&q

Everyday Git Commands

Git is a free and open source distributed version control system and a great one as well! Easy branch creation and jump between branches are some of its greatest features and here are some common commands that I use most of the time, hope this helps. Set global settings for user information $ git config --global "[name]" $ git config --global "[email address]" Check status git status Clone a project and working with branches $ git clone [https://repository-link] $ git checkout [branch-name] Creating a new branch $ git checkout -b feature/[branch-name] $ git checkout -b bugfix/[branch-name] $ git checkout -b release/[branch-name] Renaming an existing branch git branch -m bugfix/[branch-name] feature/[branch-name]  --> Long version of renaming a branch (from bugfix to feature in this example) git branch -m {bugfix,feature}/[branch-name] --> Short version of renaming a branch (from bugfix to feature in this example) Adding changes for commit

How to delete duplicate records from a table by using a CTA in SQL Server

You can use a CTA (Common Table Expression)  to delete duplicate records from a SQL Server table by writing a statement like this; WITH Location_CTE AS ( SELECT [Id]       , [LocationQuery]       , [DetailsResponseJson]       , [DateCreated]       , [DateUpdated] ,          ROW_NUMBER () OVER (               PARTITION BY                      [LocationQuery]               ORDER BY                      [LocationQuery]          ) Row_Num   FROM [dbo] . [Location] ) DELETE FROM Location_CTE WHERE Row_Num > 1 (34902 rows affected) Completion time: 2020-08-05T11:43:14.4827453+01:00 This will return the number of rows affected and then you can check whether you still have duplicate records with a group by statement.     SELECT     [LocationQuery] ,               COUNT ( LocationQuery )      FROM      [dbo] . [Location]   GROUP BY      [LocationQuery]   ORDER BY      COUNT ( LocationQuery ) desc

Umbraco V8 Upgrade from V7 - Developer Notes

Recently I have started working on upgrading my client's Umbraco v7.15.4 website to Umbraco v8.6.3 (current latest version) and decided to write this blog as it can be very tricky and you might end up spending hours if not days to fix your problems. I'd be very happy if I can help you to save some time and do better planning before doing your upgrade. Before you start doing anything, you should know that; Umbraco 8 is a major release. There will be a lot of breaking changes, for my case 435 new features, 95 breaking changes and 1254 issues & tasks.   Please check the local development and hosting requirements , otherwise the upgrade will fail and you have to rollback your changes to try again. One important thing, please make sure you have done all your Visual Studio 2017 or 2019 upgrades first. Ensure that you have got .NET Framework 4.7.2 installed. Upgrade your v7 Umbraco project to 7.14+, latest v7 version would be your best option. Umbraco codebase has been fundamental

Postman - Useful Queries for Azure Search Service

Search by text$count=true$count=true Top&skip$top=3&$skip=0&$count=true Facets - postman$count=true&facet=specialisms Facets - return all facets$count=true&facet=specialisms, count:9999&facet=clientele, count:9999&$filter=listingType eq 'Therapist' Return everything

How to Setup Custom Umbraco Error Pages per HTTP Status Error Code (e.g: 400, 401, 403, 404, 500, etc.)

In order to create human friendly content editable custom error pages for an Umbraco project, below are the steps that you can follow; In your web.config ( system.webServer  section), add the following setting to tell the site to pass all of the error handling through you application:         < httpErrors   existingResponse = " PassThrough "  /> Add the httpErrors - this is an IIS level setting rather than an ASP.NET setting, therefore, this needs to go into the  system.webServer  section in the web.config: < system.webServer > …     < httpErrors   errorMode = " Custom "   existingResponse = " Replace " >       < clear />       < error          statusCode = " 400 "          path = " /error-pages/http-errors/400/ "          responseMode = " ExecuteURL " />       < error           statusCode = " 401 "           path = " /error-pages/http-errors