You are not logged in.
Pages: 1
Hi,
I am not sure but probable we have regression for MVC demo. The problem is visible for logged user (in this case synopse). Seems that Mustache won't work anymore for sets (like in ArticleView.html):
{{#main.session.AuthorRights.canComment}}
In case of "ArticleView.html view" the logged user can't comment articles anymore. Could someone confirm that?
best regards,
Maciej Izak
Offline
I am not sure but probable we have regression for MVC demo
hmm. Seems that sample "30 - MVC Server" is broken for long time ("Add Comment" functionality is not displayed). Tested with latest mORMot on Delphi and FPC, also very old mORMot (I use for test purposes old version from 2015 January) is broken so this bug is not new :\ ...
best regards,
Maciej Izak
Offline
The view was incorrect, not the framework...
See https://synopse.info/fossil/info/288dc03168
To check the expected execution context of a given page, add /json to the URI:
http://localhost:8092/blog/ArticleView?id=10000&withComments=true#comments
into
http://localhost:8092/blog/ArticleView/json?id=10000&withComments=true#comments
Then you can see the context:
...
"main": {
"pageName": "ArticleView",
"blog": {
"Title": "mORMot BLOG",
"Language": "en",
"Description": "Sample Blog Web Application using Synopse mORMot MVC",
"Copyright": "©2015 <a href=http://synopse.info>Synopse Informatique</a>",
"About": "Bla? Ble, bla ble, bli bla ble blu ble. Blo blu. Bla ble, blu bla blu blu bli blu blu bla, bli blo blo blo bli bli blu blo.\r\nBlo bla!"
},
"session": {
"AuthorName": "synopse",
"AuthorID": 1,
"AuthorRights": {
"Comment": true,
"Post": true,
"Delete": true,
"Administrate": true
},
"id": 1
},...
Here can see that the expected value is "Comment", not "canComment"...
Offline
Nice trick with /json, thanks . I think that we have problem in framework. "AuthorRights" works correctly only for FPC, Delphi (in my case XE2) shows
"AuthorRights":15,
instead of
"AuthorRights": {
"Comment": true,
"Post": true,
"Delete": true,
"Administrate": true
}
ArticleView is still buggy in Delphi.
best regards,
Maciej Izak
Offline
In fact, sounds like if it never worked since Delphi 2010: you needed to define the record layout by text for proper set serialization.
Should be fixed by https://synopse.info/fossil/info/d55a66ff4a
So it worked correctly with FPC or Delphi 7...
Offline
Finally works as expected . Btw. amazing experience: VPS server with own blog/small site with https without any "apache". Just Debian + FPC mORMot application + nginx on the front.
Did we have any plans to support HTTPS via SynOpenSSL in near future? If yes then probably will be possible to drop nginx (maybe not at all if someone needs load balancing)!
best regards,
Maciej Izak
Offline
Pages: 1