Using own master with new fields added to Articulate docTypes
Hi,
Umb 7.4.3 (upgraded from 6.1.5)
Adding Articulate blog to existing upgraded site. Using /Views/master.cshtml for the blog which expects some fields to exist. Added these fields to the Articulate docType. Get YSOD complaining "Object reference not set to an instance of an object." at Line 9: var pageTitle = string.IsNullOrWhiteSpace(Model.GetPropertyValue("metaTitle").ToString())
Thanks MarcC but that didn't work. It just errors on the line where @pageTitle is called. I have the impression it's a deeper issue than it initially appears as the pageTitle code works fine for all pages other than Blog and it's child pages.
Using own master with new fields added to Articulate docTypes
Hi,
Umb 7.4.3 (upgraded from 6.1.5)
Adding Articulate blog to existing upgraded site. Using /Views/master.cshtml for the blog which expects some fields to exist. Added these fields to the Articulate docType. Get YSOD complaining
"Object reference not set to an instance of an object."
atLine 9: var pageTitle = string.IsNullOrWhiteSpace(Model.GetPropertyValue("metaTitle").ToString())
/Views/master.cshtml looks like this:-
Is it possible to get this working?
If it makes a difference, I have ModelsBuilder switched off in web.config as I wasted a whole day trying to get it working and failed (miserably).
Thanks
Hey,
Could you maybe use HasValue and check?
Good luck
Thanks MarcC but that didn't work. It just errors on the line where @pageTitle is called. I have the impression it's a deeper issue than it initially appears as the pageTitle code works fine for all pages other than Blog and it's child pages.
Continuing my quest for answers at https://github.com/Shazwazza/Articulate/issues/158
Thanks.
The answer, dear friends, lies here: https://www.marceldigital.com/blog/2015/09/how-to-setup-an-articulate-blog-package-to-an-existing-umbraco-layout
It slightly outdated now but it got me working :)
I just had to remove this line from List.cshtml:- Html.RequiresCss("http://cdnjs.cloudflare.com/ajax/libs/octicons/2.1.2/octicons.css");
Hope this helps some other poor sap :)
is working on a reply...