OUR-419 - Notification link giving the error

Created by Urvish Mandaliya 22 Aug 2016, 12:33:14 Updated by Michaël Vanbrabandt 06 Sep 2016, 13:13:10

Hi,

While i was editing my profile in this our.umbraco.org site, I clicked on the Notification link and it gave me below YSOD.

Regards, Urvish Mandaliya

1 Attachments

Comments

Michaël Vanbrabandt 29 Aug 2016, 07:45:46

Same issue here.

When I noticed I was missing posts on my projects forum and tried to go and have a look at the notifications settings I got the same error.

/Michaël


Sebastiaan Janssen 29 Aug 2016, 11:55:56

This seems to be a bug in Umbraco itself when doing paged queries.


Stephan 31 Aug 2016, 08:37:40

Reproduced on Our.


Stephan 31 Aug 2016, 09:48:02

Reproduced in dev. The code is similar too:

var sql = new Sql() .Select("*") .From(); sql.Where(x => x.Level == 1); var dtos = database.Page(1, 2, sql);

which generates a query looking like:

SELECT * FROM [umbracoNode] WHERE (([umbracoNode].[level] = @0)) OFFSET @1 ROWS FETCH NEXT @2 ROWS ONLY

which is wrong because OFFSET...FETCH is part of the ORDER BY syntax and cannot be used alone.

So the original error is Our's that should create queries like:

var sql = new Sql() .Select("*") .From(); sql.Where(x => x.Level == 1); sql.OrderBy(x => x.NodeId); // MUST order by something when paging var dtos = database.Page(1, 2, sql);

Is it possible that this has always been broken? Or should we look into what could have change in Umbraco to cause the issue to appear?


Michaël Vanbrabandt 31 Aug 2016, 10:44:50

For me its the first time I used the Notifications link on my profile page. So I wouldn't know how long this has been the issue.

/Michaël


Urvish Mandaliya 31 Aug 2016, 10:47:59

I believe that since long time I am not getting the notification (email) from the post which I have created.

So it might be the issue from long time.

Regards, Urvish Mandaliya


Stephan 31 Aug 2016, 12:49:03

This is linked to the upgrade to 7.5 - where UmbracoDatabase now pretends we are SqlCE if we are SQL and our version is > 2012 - but only when creating paging queries, meaning that 7.5 uses a new, more efficient, paging methods for SQL (the one SqlCE already used), which requires an ORDER BY statement in the original query.

See this commit: https://github.com/umbraco/Umbraco-CMS/commit/c1da28dd47611d693c663d3a5225c754ceef2097

Deciding to keep the commit (no revert) & fixing the queries in Our.


Stephan 31 Aug 2016, 12:50:39

Fixed in https://github.com/umbraco/OurUmbraco/commit/bb206a5cc53e523b6b0ce62e585f046c670f5759


Sebastiaan Janssen 01 Sep 2016, 17:29:59

Will be deployed tomorrow.


Michaël Vanbrabandt 01 Sep 2016, 18:27:30

@sebastiaan thanks for the intel!


Urvish Mandaliya 02 Sep 2016, 04:29:04

@sebastiaan , @zpqrtbnk Thanks for resolving the issue.


Michaël Vanbrabandt 05 Sep 2016, 06:32:24

ok this problem is solved but now I get the message: Oops something went wrong... There was a problem! The error has been logged.

/Michaël


Sebastiaan Janssen 05 Sep 2016, 06:48:43

Neh, that's just because I added a custom error page. :-)

I haven't deployed these changes yet. I'll update when that's done.


Sebastiaan Janssen 06 Sep 2016, 10:00:29

@info@mivaweb.be This is now rolled out and you should be able to use it again.


Urvish Mandaliya 06 Sep 2016, 10:09:37

Great.. Its done.. Thanks @sebastiaan .
Thanks for looking into that.


Michaël Vanbrabandt 06 Sep 2016, 13:13:10

Same here thanks!


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty:

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version:

Sprint: Sprint 41

Story Points:

Cycle: