FindPagesWithCriteria works in one computer but not another

Vote:
 
Hello, I have implemented basically the same exercise below in two different computers but for some reason it doesn't work on one of them. Are there any database settings or some other configuration necessary to make this work? Thanks. Regards Victor Aspx:
Code Behind: using System; using EPiServer; using EPiServer.Core; using EPiServer.Filters; namespace Unctad.Web.Templates { public partial class test : TemplatePage { protected void Page_Load(object sender, EventArgs e) { } public PageDataCollection GetPages() { PropertyCriteriaCollection criterias = new PropertyCriteriaCollection(); PropertyCriteria criteria = new PropertyCriteria(); criteria.Condition = CompareCondition.Equal; criteria.Type = PropertyDataType.PageType; criteria.Value = "7"; criteria.Name = "PageTypeID"; criteria.Required = true; criterias.Add(criteria); PageDataCollection pages = Global.EPDataFactory.FindPagesWithCriteria(Global.EPConfig.StartPage, criterias); return pages; } protected void epiButton_Click(object sender, EventArgs e) { epiPages.DataSource = GetPages(); DataBind(); } } }
#13002
Mar 25, 2008 18:35
Vote:
 
Are the two installations sharing database? If not, the PageTypes could have different PageTypeID's.
#15238
Mar 25, 2008 18:46
Vote:
 
Thank you for your response. Yes, they have their local database but I did change the PageType ID accordingly. In fact, I tried all numbers but would not get a result for any of them.
#15239
Mar 25, 2008 18:46
Vote:
 

Bump

I Am having the same issue with FindPagesWithCriteria. Works locally but not on test server. I fetch the pagetypeid with code so I know it's FindPagesWithCriteria that is the problem. Did you get any answer why it didn't work on your test server. My only criteria is pagetypeid.

#118791
Mar 13, 2015 16:18
Vote:
 

what version are you guys on?

#118801
Mar 14, 2015 19:27
Vote:
 

Hi Henrik, I'm on version 7. I've creted a detailed forum-post for my problem here -> http://world.episerver.com/Modules/Forum/Pages/Thread.aspx?id=118792&epslanguage=en

#118802
Mar 14, 2015 20:31
* 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.