Strange issue

5 posts by 2 authors in: Forums > CMS Builder
Last Post: April 9, 2009   (RSS)

By Ginslinger - April 8, 2009 - edited: April 8, 2009

Working on creating a news page and have created a news.php page for the list page and news_detail for the detail page.

List page will show all entries and link to detail page works fine but only for the first entry. Trying to access detail page for anything other than the first entry only brings up record not found. I have spent way to much time trying to figure out what is going on. Any ideas? I could understand it if nothing showed but why only one article and not others?

Here is a link to the page in question. Click on Shrove Tuesday link and it will work. Others come up record not found
http://www.stdavidsonline.org/news.php

Re: [Ginslinger] Strange issue

By zip222 - April 9, 2009

I took a look but wasn't able to figure out the problem from the live view. Can you post your two viewer pages to this thread?

Re: [Ginslinger] Strange issue

By zip222 - April 9, 2009

I think its likely that the error is coming from the second viewer (deadline), but you don't need to remove it, you just need to remove the bold line below...

<?php
require_once "/home/stdavid/public_html/cms/lib/viewer_functions.php";

list($deadlineRecords, $deadlineMetaData) = getRecords(array(
'tableName' => 'deadline',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$deadlineRecord = @$deadlineRecords[0]; // get first record

// show error message if no matching record is found
if (!$deadlineRecord) {
print "Record not found!";
exit;
}

?>

Re: [jdancisin] Strange issue

By Ginslinger - April 9, 2009

That did the trick. Appreciate the help.

Thanks

Tim