Beta5 does not works with many pages !!

General project discussion. NOT for help questions.
Post Reply
Piratos

Beta5 does not works with many pages !!

Post by Piratos »

Modules installed CSSMENU and FCKEDITOR

130 Pages  - all ok

260 Pages  - nothing works
The error by calling the first page
Fatal error: Call to undefined method stdClass::Hierarchy() in I:\xampp\htdocs\ctest\modules\CSSMenu\CSSMenu.module.php on line 234
The error calling admin listcontent
Fatal error: Call to undefined method stdClass::Hierarchy() in I:\xampp\htdocs\ctest\admin\listcontent.php on line 261

This is your log.txt

11/18/05 11:19:13,244 [964] INFO index.php - Serving URL:/ctest/
11/18/05 11:19:13,245 [964] DEBUG index.php - Starting index.php
11/18/05 11:19:13,249 [964] DEBUG include.php - Starting include.php
11/18/05 11:19:13,476 [964] DEBUG include.php - Leaving include.php
11/18/05 11:19:13,486 [964] DEBUG content.functions.php - Starting template_get_timestamp
11/18/05 11:19:13,486 [964] DEBUG content.functions.php - Template found.  Leaving template_get_timestamp
11/18/05 11:19:13,489 [964] DEBUG include.php - Fetching: template:1
11/18/05 11:19:13,492 [964] DEBUG function.cms_module.php - Starting smarty_cms_function_cms_module

------------------------------------------------------------------
Your last stable version has no problems with 5000 pages and all modules installed !

...............

The limit of beta5 is about 200 pages.
Last edited by Piratos on Fri Nov 18, 2005 10:45 am, edited 1 time in total.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Beta5 does not works with many pages !!

Post by Ted »

There is a bug in the makecontent script that is causing this.  Hierarchy wasn't getting set correctly.  Here is my modified version.  With it, everything works well.

Code: Select all

<?php
require_once("include.php");
// Quick and dirty script
// It trunctes table content and content_props and write new contents

$template_id = 1;

$content ='
<h2>Stand der Dinge bei PISCMS http://piratos.coftware.de</h2>
<p>Test abgeschlossen - geringe Feinarbeiten sind zu erledigen.</p>
<p>Aus bestimmten Gr?nden habe ich mich entschieden, parallel eine "professionelle Version" zu erstellen, deren Bestandteile nicht zum Download angeboten werden.</p>
<ul>
<li>mit Smarty<b> --> Ok</b></li>
<li>mit TinyMCE<b> --> Ok</b></li>
<li>mit Adminteil<b> --> 90%</b></li>
<li>mit Doku im PDF Format<b> --> 45%</b></li>
<li>mit Pisearch als Suchm?glichkeit<b> --> Ok</b></li>
<li>Mit Pibrowser als automatischer Styleswitcher in Abh?ngigkeit vom Browsertyp<b> --> Ok</b></li>
<li>Pifaq als FAQ - System<b> --> Ok - nur f?r die Professionell Version</b></li>
<li>Pinews als Newssystem<b> --> Ok - nur f?r die Professionell Version</b></li>
<li>Pinewsletter<b> --> Ok - nur f?r die Professionell Version</b></li>
<li>Picar<b> --> Ok - nur f?r die Professionell Version</b></li>
<li>Pikontakt<b> --> Ok</b></li>
<li>Pirss<b> --> Ok</b></li>
<li>Pilastmodified<b> --> Ok</b></li>
<li>Piflash<b> --> Ok</b></li>
<li>Pivalidator<b> --> Ok</b></li>
<li>3 verschiedene Men?systeme<b> -->Ok</b></li>
<li>5 verschiedene komplette Mustertemplates<b> --> Ok</b></li></ul>';

// Make the first contents
// This is the counter to create pages until $each is arrived - change it to what you want.
// Writes at standard 1300 Contents with Sublevels.
$end=50;


$i=0;
$xi=0;
$all=0;
$dbresult = $db->Execute('TRUNCATE TABLE '.cms_db_prefix()."content");
while ($i<$end)
{
 $xi++;
 $iii=$i+1;
 if ($i<1) {$h='00001';}else{$h=str_repeat('0',5-strlen($iii)).$iii;}
 $menu='Content '.$xi;$alias='content'.$xi;
 
 $today=date("y-m-d h:m:s");
$ii=$i-1;
$pi=-1;
if ($iii == 1) {$df=1;}else{$df=0;}
$all++;
$query ="INSERT INTO ".cms_db_prefix()."content ( CONTENT_ID, CONTENT_NAME, TYPE, OWNER_ID, PARENT_ID, TEMPLATE_ID, ITEM_ORDER, HIERARCHY, DEFAULT_CONTENT, MENU_TEXT, CONTENT_ALIAS, COLLAPSED, SHOW_IN_MENU, MARKUP, ACTIVE, CACHABLE, LAST_MODIFIED_BY, CREATE_DATE, MODIFIED_DATE ) VALUES (".$xi.",'".$alias."', 'content', 1, -1, $template_id,".$xi.",'".$h."',".$df.",'".$menu."','".$alias."', null, 1, 'html', 1, 1, 1,'".$today."','".$today."' )";
$dbresult = $db->Execute($query);
 
$query ="INSERT INTO ".cms_db_prefix()."content_props ( CONTENT_ID, TYPE, PROP_NAME, PARAM1, PARAM2, PARAM3, CONTENT, CREATE_DATE, MODIFIED_DATE ) VALUES ( ".$xi.", 'string', 'content_en', null, null, null, '".$content."','".$today."','".$today."')";
$dbresult = $db->Execute($query);
 
$si=0;
$ssi=0;
$oldxi = $xi;
while ($si < 3)
{
  // make sublevel 1
  $si++;
  $hh=$h.'.'.str_repeat('0',5-strlen($si)).$si;
  $xi++;
  $all++;
  $menu='Content '.$xi;$alias='content'.$xi;
  $query ="INSERT INTO ".cms_db_prefix()."content ( CONTENT_ID, CONTENT_NAME, TYPE, OWNER_ID, PARENT_ID, TEMPLATE_ID, ITEM_ORDER, HIERARCHY, DEFAULT_CONTENT, MENU_TEXT, CONTENT_ALIAS, COLLAPSED, SHOW_IN_MENU, MARKUP, ACTIVE, CACHABLE, LAST_MODIFIED_BY, CREATE_DATE, MODIFIED_DATE ) VALUES (".$xi.",'".$alias."', 'content', 1,".$oldxi.", $template_id,1,'".$hh."',".$df.",'".$menu."','".$alias."', null, 1, 'html', 1, 1, 1,'".$today."','".$today."' )";
  $dbresult = $db->Execute($query);
  $query ="INSERT INTO ".cms_db_prefix()."content_props ( CONTENT_ID, TYPE, PROP_NAME, PARAM1, PARAM2, PARAM3, CONTENT, CREATE_DATE, MODIFIED_DATE ) VALUES ( ".$xi.", 'string', 'content_en', null, null, null, '".$content."','".$today."','".$today."')";
  $dbresult = $db->Execute($query);
  // make sublevel 2
  $ssi=0;
  $oldxi = $xi;
  while ($ssi <3)
  {
  $ssi++;
  $hhh=$hh.'.'.str_repeat('0',5-strlen($ssi)).$ssi;
  $xi++;
  $all++;
  $menu='Content '.$xi;$alias='content'.$xi;
  $query ="INSERT INTO ".cms_db_prefix()."content ( CONTENT_ID, CONTENT_NAME, TYPE, OWNER_ID, PARENT_ID, TEMPLATE_ID, ITEM_ORDER, HIERARCHY, DEFAULT_CONTENT, MENU_TEXT, CONTENT_ALIAS, COLLAPSED, SHOW_IN_MENU, MARKUP, ACTIVE, CACHABLE, LAST_MODIFIED_BY, CREATE_DATE, MODIFIED_DATE ) VALUES (".$xi.",'".$alias."', 'content', 1,".$oldxi.", 1,1,'".$hhh."',".$df.",'".$menu."','".$alias."', null, 1, 'html', 1, 1, 1,'".$today."','".$today."' )";  $dbresult = $db->Execute($query);
  $query ="INSERT INTO ".cms_db_prefix()."content_props ( CONTENT_ID, TYPE, PROP_NAME, PARAM1, PARAM2, PARAM3, CONTENT, CREATE_DATE, MODIFIED_DATE ) VALUES ( ".$xi.", 'string', 'content_en', null, null, null, '".$content."','".$today."','".$today."')";
  $dbresult = $db->Execute($query);
  }

}


$i++;
}
$query="UPDATE ".cms_db_prefix()."content_seq SET id=".$all;
$dbresult = $db->Execute($query);
$query="UPDATE ".cms_db_prefix()."content_props_seq SET id=".$all;
$dbresult = $db->Execute($query);


echo 'done ! '.$all.' contents written.';
Piratos

Re: Beta5 does not works with many pages !!

Post by Piratos »

Ok ! Now it works. Thanks.
Post Reply

Return to “General Discussion”