[TYPO3-english] Page Not Found Issue - postVarSet - RealURL?

Nkwe Masai ashofthebushveld at gmail.com
Fri Jul 25 10:25:45 CEST 2014


Hi all,

I am using RealURL extension to generate automatic links when a new page is published. But it doesn't seem to work. The URLs on the page display the path e.g. domain.com/640 and when you click on the link, I get this error:

Page Not Found - Reason: Segment "640" was not a keyword for a postVarSet as expected on page with id=1.

The page is otherwise accessible from other parts of the site, but it uses a cached HTML format for the URL, not page ID 640. So perhaps there is a conflict with the HTML cache and RealURL.

This is the code I am using:

<div align=center style="font-size:16px; font-weight: bold">What's new in Resources</div><br>
<div align=center>
<a href="<?=$self?>?spec=week&gal=<?=$show_gal?>">In the last Week</a><br>
<a href="<?=$self?>?spec=month&gal=<?=$show_gal?>">In the last month</a></div><br>
<div align=center><b>
<?php
if ($show_spec == 'week')
{
  echo "Updated and totally new pages in the last week. Newest changes will show at  the top of this list.<br>";
  $per = strtotime("1 Week ago");
}
if ($show_spec == 'month')
{
  echo "Updated and totally new pages in the last month. Newest changes will show at  the top of this list.<br>";
  $per = strtotime("1 Month ago");
}
  $pids[] = 7;
  $pids[] = 43;
  $pids[] = 44;
  $pids[] = 53;
  $where = "(";
  while ($pids)
  {
    $k = array_shift($pids);
    $t_res = mysql_query("select * from pages where pid=$k and deleted=0 and hidden=0");
    while($t_data = mysql_fetch_array($t_res))
    {
       $pids[] = $t_data['uid'];
    }
    $where .= "$k, ";
  }
  $where = substr($where, 0, -2);
  $where .= ")";
  $query = "select distinct * from tt_content where deleted=0 and tstamp>$per and pid in $where and (CType='text' or CType='textpic' or CType='image') order by tstamp desc";
//  echo $query;
  $ip_res = mysql_query($query);
  echo mysql_error();

?>
</b></div>
<?php
$already_shown = array();
if (mysql_num_rows($ip_res) > 0)
{
    $counter = 1;
    while ($ip_data = mysql_fetch_array($ip_res))
    {
      if (!in_array($ip_data['pid'], $already_shown))
     {
        //get page data 
        $pp_res = mysql_query("select * from pages where uid=".$ip_data['pid']);
        $pp_data = mysql_fetch_array($pp_res);
        //get path to new page
        $p_res = mysql_query("select * from tx_realurl_urlcache where page_id=".$ip_data['pid']." order by cache_id desc");
        $p_data = mysql_fetch_array($p_res);
        //echo $counter.". <a href='htp://".$p_data['url']."'>".$pp_data['title']."</a><br>";
echo $counter.". <a href='htp://www.domain.com/".$ip_data['pid']."/'>".$pp_data['title']."</a> (".date("m/d/Y",$ip_data['tstamp']).") <br>";

        $counter++;
        $already_shown[] = $ip_data['pid'];
      }
    }
}
else
{
  echo "<b>*** No new Pages ***</b><br>";
}

?>

Any help would be much appreciated! I suspect there is just something wrong with the code above, but I can't see what...

PS. Intentionally removed 't' from http above as forum prevented me from posting links as this is my first post.


More information about the TYPO3-english mailing list