I have managed to fix the cast errors along with other errors in the extension classes of blog and portfolio.
Now I facing a different issue that I hope someone can help.
After adding a property and do a 'Generate Model' the following line in the siteTemplate.cshtml returns the following error:
Method not found: 'System.Object Umbraco.Web.PublishedContentModels.ConfigGlobalSettings.get_PolicyIfOgtagEmpty()'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.MissingMethodException: Method not found: 'System.Object Umbraco.Web.PublishedContentModels.ConfigGlobalSettings.get_PolicyIfOgtagEmpty()'.
I'm trying to get to the source of the problem and fix it, but I'm afraid that this error may be in the code inside the 'DotSee.PageMetas.dll', which I can't find the source.
Anyone with any pointers or hints where to look?
I already checked the generated model for ConfigGlobalSettings (ConfigGlobalSettings.generated.cs in App_Data\Models) and the property 'PolicyIfOgtagEmpty' exist there, so I don't know where else I can check...
So what happens is that either something is going on with the runtime cache, or that you are no longer referencing Umbraco.Web.PublishedContentModels (since you are talking about an app_data model build).
Sorry I can't help more at the moment, as I said, crazy workload :(
Ah! Now that I see it, it just might be a cast error too. If there's been a new property value converter for radio button lists, then this might be it. I haven't tested PageMetas in 7.6 (nor the theme, for that matter) so I'm not sure yet.
Unable to load MetaSettings after model build
I'm using umbraco v7.6.2.
I have managed to fix the cast errors along with other errors in the extension classes of blog and portfolio.
Now I facing a different issue that I hope someone can help.
After adding a property and do a 'Generate Model' the following line in the siteTemplate.cshtml returns the following error:
This error is throw in the following line:
MetaSettings settings = configPage.GetMetaSettings();
A little more details on it:
I'm trying to get to the source of the problem and fix it, but I'm afraid that this error may be in the code inside the 'DotSee.PageMetas.dll', which I can't find the source.
Anyone with any pointers or hints where to look?
I already checked the generated model for ConfigGlobalSettings (ConfigGlobalSettings.generated.cs in App_Data\Models) and the property 'PolicyIfOgtagEmpty' exist there, so I don't know where else I can check...
Thanks in advance
I feel I must apologize for not being able to answer for quite a few weeks now, due to an insane workload.
PageMetas is a reusable library that I've been using in quite a few sites. What causes the error is here:
But this one is in turn called by this:
So what happens is that either something is going on with the runtime cache, or that you are no longer referencing Umbraco.Web.PublishedContentModels (since you are talking about an app_data model build).
Sorry I can't help more at the moment, as I said, crazy workload :(
Thanks a lot Sotiris, I will deep dive into that.
Ah! Now that I see it, it just might be a cast error too. If there's been a new property value converter for radio button lists, then this might be it. I haven't tested PageMetas in 7.6 (nor the theme, for that matter) so I'm not sure yet.
By the way I have done some changes for it to work on 7.6.2, if you want it to check it out just let me know.
I think it is.
I will try to manually populate the setting object from cache with one of the calls that you have on the previous post.
If you can post the full GetMetaSettings function will be great.
Thanks anyway
Thanks, I know I should change it for 7.6 already, but tons of work, tons!
Here's the full code for the whole file containing the GetMetaSettings function:
Thanks a lot man, you are a saver.
Happy coding!
Thanks again Sotiris.
Here is the code that I used:
Also change the following line in the siteTemplate.cshtml to:
The issue was the type conversion, the properties are no longer string these are now int.
Hey Jesus
How did you go about fixing the errors in Blog and Portfolio helpers in 7.6?
I am using 7.6.6 and hit the same issues when adding a new Document Type property, and then generating models.
I have fixed a couple, but the others I have commented out for now until I can look at them properly (mainly the Category CSV helper methods).
I am going to implement your custom meta helper above as I am now hitting this issue.
Thanks
Paul
is working on a reply...