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]



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!!

Mar 02, 2016 6:48

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

Mar 02, 2016 8:36

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.


Mar 02, 2016 10:18

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.

Edited, Mar 02, 2016 12:14
<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>
Mar 03, 2016 9:26

What version of CMS are you using?

Mar 03, 2016 9:49

hI Daniel Ovaska  

ITS 7.0

Edited, Mar 03, 2016 10:11
<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>
Mar 03, 2016 12:50

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.

Edited, Mar 03, 2016 15:59
<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>
Mar 04, 2016 3:57

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

Try removing the dll for a start.

Mar 04, 2016 8:28

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.


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

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)

Mar 05, 2016 9:46

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())
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...

Edited, Mar 05, 2016 17:46
<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>
Mar 31, 2016 6:52

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. :)

Mar 31, 2016 8:21

Daniel Ovaska 

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


Mar 31, 2016 10:20

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


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. 

Mar 31, 2016 10:39

Hi Daniel Ovaska 

its returning type as "PageVersion"

Mar 31, 2016 12:56

Hi Daniel Ovaska 

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

Any suggestion,

Apr 03, 2016 9:16

Get in touch with support and register a support ticket.

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.