Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Exception has been thrown by the target of an invocation. [Must be of type PageData Parameter name: value]

Vote:
 

Hi

I am getting below exception "Publish Delayed Page Versions" job

Exception has been thrown by the target of an invocation. [Must be of type PageData Parameter name: value]

Please help!!

#145325
Mar 02, 2016 6:48
Vote:
 

Can you turn on logging on debug level and see if that gives what page it is complaining about?

#145328
Mar 02, 2016 8:36
Vote:
 

Hi Daniel Ovaska  

Can you please tell me where exaclty i can turn on logging as i could check this in my TEST and PROD environment only.

Thanks

#145336
Mar 02, 2016 10:18
Vote:
 

It's a config file in root of website called episerverlog.config. You need to lower the threshold on the root to all and set it to use the rollingfileappender. Check out documentation about enabling logging.

http://world.episerver.com/documentation/Items/Developers-Guide/Episerver-CMS/9/Logging/logging-with-log4net/

#145350
Edited, Mar 02, 2016 12:14
Vote:
 
<p>Hi&nbsp;</p> <p>I have changed the log file as mentioned by you. but i could see their is no logging happening for this issue.</p> <p>Thanks!</p>
#145398
Mar 03, 2016 9:26
Vote:
 

What version of CMS are you using?

#145400
Mar 03, 2016 9:49
Vote:
 

hI Daniel Ovaska  

ITS 7.0

#145403
Edited, Mar 03, 2016 10:11
Vote:
 
<p><span>hI&nbsp;</span><a href="/System/Users-and-profiles/Community-Profile-Card/?userid=87c90252-5047-dd11-93be-0018717a8c82">Daniel Ovaska</a><span>&nbsp;&nbsp;</span></p> <p><span></span></p> <p><span>This is the complete exception:</span></p> <p><span>2016-03-03 12:43:11,295 [123] ERROR EPiServer.DataAbstraction.ScheduledJob: 3.1.2 Failed to execute job 46dca29f-493c-4bfb-b426-2ca6d53bd7b2<br />System.ArgumentException: Must be of type PageData<br />Parameter name: value<br /> at EPiServer.DataFactory.ListDelayedPublish()<br /> at POSSIBLE.ProfiledContentRepository.ProfiledContentRepository.ListDelayedPublish()<br /> at EPiServer.Util.DelayedPublishJob.Execute(IContentRepository contentRepository)</span></p>
#145414
Mar 03, 2016 12:50
Vote:
 

Hmm you have a custom repository?

Try disabling that. That's the most probable reason....I think I saw something about a bug related to that Possible repo combined with delayed publishing on github.

#145433
Edited, Mar 03, 2016 15:59
Vote:
 
<p><span>Hi&nbsp;</span><a href="/System/Users-and-profiles/Community-Profile-Card/?userid=87c90252-5047-dd11-93be-0018717a8c82">Daniel Ovaska</a><span>&nbsp;</span></p> <p><span></span></p> <p><span>Could you be more specific about custom repository and where i can disable it.</span></p> <p><span>Thanks!</span></p>
#145462
Mar 04, 2016 3:57
Vote:
 

From your stack trace it looks like you are using this plugin for profiling?

http://www.markeverard.com/2013/03/14/using-miniprofiler-with-episerver-cms7/

Try removing the dll for a start.

#145468
Mar 04, 2016 8:28
Vote:
 

Hi Daniel Ovaska 

I tried but their is dependency assciated and i cannot go that much deep.

Please can you give some alternate solution or atleast some idea for debugging .

Also let me know what is need of removing profiler here.

Thanks

#145477
Edited, Mar 04, 2016 10:58
Vote:
 
<p>Upgrade to newer version of plugin?</p>
#145484
Mar 04, 2016 12:12
Vote:
 

Hi  Daniel Ovaska  

FYI the detailed exception. Hope this will help you to identify the solution.

2016-03-05 00:00:18,267 [152] ERROR EPiServer.DataAbstraction.ScheduledJob: 3.1.2 Failed to execute job d6833606-63ac-4250-9cb1-8f6dec8c75d5
System.ArgumentException: Must be of type PageData
Parameter name: value
at EPiServer.Core.PageDataCollection.Add(Object value)
at EPiServer.DataFactory.ListDelayedPublish()
at POSSIBLE.ProfiledContentRepository.ProfiledContentRepository.ListDelayedPublish()
at EPiServer.Util.DelayedPublishJob.Execute(IContentRepository contentRepository)

#145538
Mar 05, 2016 9:46
Vote:
 

using System;
using log4net;
using EPiServer.Core;
using EPiServer.ServiceLocation;

--------------------

var logger = LogManager.GetLogger("PageTypeErrorLogger");
var contentVersionRepository = ServiceLocator.Current.GetInstance<IContentVersionRepository>();
PageDataCollection pageDataCollection = new PageDataCollection();
foreach (ContentReference contentLink in contentVersionRepository.ListDelayedPublish())
{
try
{
pageDataCollection.Add(DataFactory.Instance.LoadVersion(EPiServer.Core.ContentReferenceExtensions.ToPageReference(contentLink)));
}
catch (Exception ex)
{
logger.Error("Error while adding pages to pageDataCollection for page of id" + contentLink.ID);
}
}



Try running this in solution and see if that will catch the problematic page in logs. Put it in a scheduled job or on startpage or similar...anywhere will work...

You probably have some weird page somewhere that Episerver can't resolve as a pagedata. Maybe some old test page or something similar...

#145542
Edited, Mar 05, 2016 17:46
Vote:
 
<p><span>Hi&nbsp;</span><span>&nbsp;</span><a href="/System/Users-and-profiles/Community-Profile-Card/?userid=87c90252-5047-dd11-93be-0018717a8c82">Daniel Ovaska</a><span>&nbsp;&nbsp;</span></p> <p><span></span></p> <p><span>As you said i figured out the Content ID now.</span></p> <p><span>Could tell me the next step now</span></p> <p><span></span></p> <p><span>Thanks</span></p>
#146922
Mar 31, 2016 6:52
Vote:
 

Search for it in edit mode and see if it's some old content that isn't used. In that case delete it and rerun job and hope for the best. :)

#146924
Mar 31, 2016 8:21
Vote:
 

Daniel Ovaska 

Do you know why these pages giving this error as i could see from code the pages are inherited from pagedata class.

Thanks

#146927
Mar 31, 2016 10:20
Vote:
 

Are they visible on website and works ok? Check if they have any version that is supposed to be published that you can delete. 

Also in the code above check what type this returns

DataFactory.Instance.LoadVersion(EPiServer.Core.ContentReferenceExtensions.ToPageReference(contentLink))

Maybe it returns null or something strange that can't be added to PageDataCollection. 

If there aren't that many pages, I would try delete them and recreate them and see if that helps. Or get in touch with EPiServer support. Something has gone wrong here with the CMS I would say. 

#146932
Mar 31, 2016 10:39
Vote:
 

Hi Daniel Ovaska 

its returning type as "PageVersion"

#146945
Mar 31, 2016 12:56
Vote:
 

Hi Daniel Ovaska 

I have removed all delayed publish item from tblworkcontent table but still getting same issue.

Any suggestion,

#146998
Apr 03, 2016 9:16
Vote:
 

Get in touch with support and register a support ticket.

#147001
Apr 03, 2016 13:22
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.