PDA

View Full Version : No Record Found after content insertion


Stan.Shaw269802
01-14-2010, 05:29 PM
Using the PowerCMS panel, I have inserted code for 4 pages, but 2 of the inserts result in a PowerCMS page displayed by content_details.php with the message "No Record Found".

Afterwards the page with the content inserted displays the inserted content properly.
The PowerCMS "View/Edit Content" panels lists the page and content.

The PowerCMS "Home" panel lists all the pages briefly then the page changes dynamically reducing to just the first two pages. The 3rd and 4th pages are only displayed when the 2nd page listing is clicked on.

Bizarre behavior, but repeatable.

My suspicion is that the "No Record Found" error is the orignal cause, but deleting the additional records and re-adding them has not resolved the issue.

Stan.Shaw269802
01-14-2010, 06:45 PM
Problem #2 in the above appears to have been resolved. I deleted most pages, and re-added them, now they all show up properly in the Home tab display.

Still have the presumed error reponse after inserting "No Record Found" to resolve.

Eric Mittman
01-15-2010, 09:09 AM
It seems that the id for the last inserted record may not be set when you are on this page. As a test of this go into the code on your content details page and go to line 148. This should be the <h1> heading for that content.

On this line just before the </h1> add in this code:


<br/>The id for this record is: <?php echo $_SESSION['WADA_Insert_Contents'] ?>


This will let you know if the id has been set for the content. If you see an id value here it indicates the content was inserted without problem and the id was set for it. To check it look at your contents table in your db and look for the id listed. It should reflect the content you just added. Please check this out and run this test then let us know what the result is.

Stan.Shaw269802
01-28-2010, 08:35 PM
in content_details.php the following code is at lines 142-149:
<div id="topNavigation">
<div id="searchBox">
<form action="contents_results.php" method="get" id="WADASearchForm">
<p>
<input type="text" name="S_Keyword" id="S_Keyword" value="" />
<input type="image" name="Search" id="Search" value="Search" alt="Search" src="../images/search.gif" />
</p>
</form>


So not what you expected, or I am looking in the wrong place...

Eric Mittman
01-29-2010, 12:24 PM
It will be about 14 lines below that, here is the specific line of code you are looking for:


<h1>Details: <?php echo($row_WADAContents['ContentRefID']); ?> - <?php echo($row_WADAContents['ContentGroup']); ?></h1>


Add in the code to see the id value, then check the db to see if you can find the matching record with the content. Let us know what you discover.

Stan.Shaw269802
01-30-2010, 05:21 AM
With that code inserted at the location you suggested there was no difference in the display:
>>>>>
<?php if ($totalRows_WADAContents > 0) { // Show if recordset not empty ?>
<h1>Details: <?php echo($row_WADAContents['ContentRefID']); ?> - <?php echo($row_WADAContents['ContentGroup']); ?><br/>The id for this record is: <?php echo $_SESSION['WADA_Insert_Contents'] ?></h1>
<h2>Below are the details for this page</h2>
<<<<<

Although it occurs to me that it wouldn't be going through that code necessarily, but rather through other code. So I tried inserting the same code where there "No record found" error message is displayed:
>>>>>
<?php } // Show if recordset not empty ?>
<?php if ($totalRows_WADAContents == 0) { // Show if recordset empty ?>
<h1>No record found.<br/>The id for this record is: <?php echo $_SESSION['WADA_Insert_Contents'] ?></h1>

<<<<<

but it failed due to an undefined index:
>>>>>
The id for this record is:
Notice: Undefined index: WADA_Insert_Contents
<<<<<

Eric Mittman
02-01-2010, 02:48 PM
If you are getting the undefined index it indicates that the session variable is not being set properly on the insert page.

I have opened you a ticket on this so that we can look into this issue further. To update the ticket please login to the site and visit your support history.

Stan.Shaw269802
02-04-2010, 05:22 AM
I guess I haven't been to the ticket support area before. I don't find a link within the forum area, nor from the front page, nor from the support link on the front page, so your direction as to where it is would be useful.

Eric Mittman
02-04-2010, 01:04 PM
Sorry about that, here is a link to the support history page:

http://www.webassist.com/mywebassist/supporthistory.php

You must be logged in first though.