Developer forum

Forum » Feature requests » Lower severity on accessing pages with permissions

Lower severity on accessing pages with permissions

Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi,

 

We have a high number of "Errors" in Monitoring, a lot of them caused by "normal/expected" behavior of opening a page that has permissions and then rendering the Sign in template.

 

Could this be lowered to an Info or Warning? From my perspective it should not be logged as an error, because there's nothing to fix. It's expected behavior.

 

Repro Scenarios:

  1. Pick a page with permissions (i.e., "My account") from the backend and click on "Show Page"
  2. Get the url from a page with permissions (i.e., "My account") and open in a (new) incognito window

 

Best Regards,

Nuno Aguiar


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Well - you have an exception in the Login.cshtml template. That can be fixed - probably a missing null check

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Nicolai,

 

It says that I have an exception in Login.cshtml, but I really don't. At least not in Login.cshtml. That is standard Swift and everything renders accurately. And even if we remove everything from the template, an error still gets logged https://www.screencast.com/t/aRMshiy1pGrb

 

So I agree there's a missing null check, just not on the template side (not sure if that's how you perceived it as well, so trying to be clear).

 

// Nuno

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

bump

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

I think the issue is that you have a page with a reference to a Login.cshtml template which no longer exists.
Maybe you have deleted a template which is still in use?

Try to execute the following sql statement:

SELECT [PageId], [PagePermissionTemplate] FROM [Page] WHERE [PagePermissionTemplate] <> ''

That will give you a list of pages with a permission template (login template).
Check if each of the different permission templates actually exists in the template folder:

Files > Templates > Extranet
Files > Templates > Designs > * > Extranet

 

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Morten,

 

You are accurate. Thanks for the additional detail.

 

This started with a Swift database from https://doc.dynamicweb.com/downloads/swift, so the "bad data" is there as well (on all Swift sites). I'll ask that team to fix the data with a simple

UPDATE [PagePermissionTemplate] FROM [Page] WHERE [PagePermissionTemplate] <> ''

 

//Nuno