Zur Navigation

Seiten sehr langsam [2]

11 Käptn Blaubär

Hallo,

die Startseiten beider Domains laden schneller, wenn man /?ncr=1 anhängt.

Ein schlaues Analysewerkzeug meldet mir für beide Domains, daß mit der /home/www/web1/html/ajax/httpheader.php etwas nicht stimmt.

Entschuldigung, daß ich mich einmische.

29.11.2013 00:16

12 ShadowLupina

Vielen Dank..was für ein analysewerkzeug?

29.11.2013 10:09

13 ShadowLupina

Und das mit dem ncr=1 ist mir auch schon aufgefallen

Deswegen wollt ich die Seiten bis das gelöst ist erst von

Der jeweiligen Hauptseite also z.b

www.mainbrick.com auf www.mainbrick.com/?ncr=1 umleiten

wie mach ich das am besten?

So?

RewriteRule / httP://www.mainbrick.com/?ncr=1

29.11.2013 10:14

14 ShadowLupina

Also ich hab mal verschiedenes versucht, wenn ich die Weiterleitung so versuche

RewriteRule / http://www.mainbrick.com/?ncr=1 [R=301,L]

macht er das zwar...aber lädt nicht die css Informationen

setze ich noch eine Bedingung davor um sicherzugehen, dass nur die com seite weitergeleitet wird
RewriteCond %{HTTP_HOST} ^www\.mainbrick\.com$
RewriteRule / http://www.mainbrick.com/?ncr=1 [R=301,L]

reagiert er gar nicht

----

Die genannt httpheader.php finde ich leider nicht...auch nicht mit meinem durchsuchstool

Was ich jedoch finde ist eine header.php in manager/controller/default

<?php
/**
 * Loads the main structure
 *
 * @package modx
 * @subpackage manager
 */
/* get top navbar */
$menus = $modx->cacheManager->get('mgr/menus/'.$modx->getOption('manager_language',null,$modx->getOption('cultureKey',null,'en')), array(
    xPDO::OPT_CACHE_KEY => $this->modx->getOption('cache_menu_key', null, 'menu'),
    xPDO::OPT_CACHE_HANDLER => $this->modx->getOption('cache_menu_handler', null, $this->modx->getOption(xPDO::OPT_CACHE_HANDLER)),
    xPDO::OPT_CACHE_FORMAT => (integer) $this->modx->getOption('cache_menu_format', null, $this->modx->getOption(xPDO::OPT_CACHE_FORMAT, null, xPDOCacheManager::CACHE_PHP)),
));
if ($menus == null) {
    $menu = $modx->newObject('modMenu');
    $menus = $menu->rebuildCache();
    unset($menu);
}
$output = '';
$order = 0;
$showDescriptions = (boolean)$modx->getOption('topmenu_show_descriptions',null,true);
foreach ($menus as $menu) {
    $childrenCt = 0;

    if (!empty($menu['permissions'])) {
        $permissions = array();
        $exploded = explode(',', $menu['permissions']);
        foreach ($exploded as $permission) $permissions[trim($permission)]= true;
        if (!empty($permissions) && !$modx->hasPermission($permissions)) continue;
    }

    $menuTpl = '<li id="limenu-'.$menu['text'].'" class="top'.'">'."\n";
    if (!empty($menu['handler'])) {
        $menuTpl .= '<a href="javascript:;" onclick="'.str_replace('"','\'',$menu['handler']).'">'.$menu['text'].'</a>'."\n";
    } else if (!empty($menu['action'])) {
        $menuTpl .= '<a href="?a='.$menu['action'].$menu['params'].'">'.$menu['text'].'</a>'."\n";
    } else {
        $menuTpl .= '<a>'.$menu['text'].'</a>'."\n";
    }

    if (!empty($menu['children'])) {
        $menuTpl .= '<ul class="modx-subnav">'."\n";
        _modProcessMenus($modx,$menuTpl,$menu['children'],$childrenCt,$showDescriptions);
        $menuTpl .= '</ul>'."\n";
    }
    $menuTpl .= '</li>'."\n";

    /* if has no permissable children, and is not clickable, hide top menu item */
    if (!empty($childrenCt) || !empty($menu['action']) || !empty($menu['handler'])) {
        $output .= $menuTpl;
    }
    $order++;
}
function _modProcessMenus(modX &$modx,&$output,$menus,&$childrenCt,$showDescriptions = true) {
    foreach ($menus as $menu) {
        if (!empty($menu['permissions'])) {
            $permissions = array();
            $exploded = explode(',', $menu['permissions']);
            foreach ($exploded as $permission) $permissions[trim($permission)]= true;
            if (!empty($permissions) && !$modx->hasPermission($permissions)) continue;
        }
        $smTpl = '<li>'."\n";

        $description = !empty($menu['description']) ? '<span class="description">'.$menu['description'].'</span>'."\n" : '';

        if (!empty($menu['handler'])) {
            $smTpl .= '<a href="javascript:;" onclick="'.str_replace('"','\'',$menu['handler']).'">'.$menu['text'].($showDescriptions ? $description : '').'</a>'."\n";
        } else {
            $url = '?a='.$menu['action'].$menu['params'];
            $smTpl .= '<a href="'.$url.'">'.$menu['text'].($showDescriptions ? $description : '').'</a>'."\n";
        }

        if (!empty($menu['children'])) {
            $smTpl .= '<ul class="modx-subsubnav">'."\n";
            _modProcessMenus($modx,$smTpl,$menu['children'],$childrenCt,$showDescriptions);
            $smTpl .= '</ul>'."\n";
        }
        $smTpl .= '</li>';
        $output .= $smTpl;
        $childrenCt++;
    }
}
$modx->smarty->assign('navb',$output);


/* assign logged in text and link */
$profile = $modx->getObject('modMenu','profile');
$modx->smarty->assign('username',$modx->getLoginUserName());
$modx->smarty->assign('profileAction',$profile->get('action'));

/* assign welcome back text */
$welcome_back = $modx->lexicon('welcome_back',array('name' => $modx->getLoginUserName()));
$modx->smarty->assign('welcome_back',$welcome_back);
unset($welcome_back);


return $modx->smarty->fetch('header.tpl');

auf den ersten Blick seh ich aber keinen Fehler

29.11.2013 10:38

15 Jörg Kruse

Und das mit dem ncr=1 ist mir auch schon aufgefallen

Dann würe ich mal die (includierten) PHP-Dateien nach dem Parameter ncr durchsuchen

Mit den Zeitmessungen kannst du zudem den Abschnitt identifizieren, der so zeitaufwendig ist - dazu musst du nur $time_start und $time_end testweise verschieben.

Möglich ist z.B., dass auf der Startseite eine langwierige Datenbankabfrage erfolgt.

Deswegen wollt ich die Seiten bis das gelöst ist erst von

Der jeweiligen Hauptseite also z.b

www.mainbrick.com auf www.mainbrick.com/?ncr=1 umleiten

wie mach ich das am besten?

RewriteCond %{THE_REQUEST} !ncr=1
RewriteCond %{HTTP_HOST} ^www\.mainbrick\.com$
RewriteRule ^$ http://www.mainbrick.com/?ncr=1 [R=302,L]

Edit:
ich würde hier übrigens nicht mit einem Status Code 301 weiterleiten, weil die Weiterleitung ja nicht dauerhaft angelegt ist!

29.11.2013 10:47 | geändert: 29.11.2013 10:50

1 Forenmitglied fand diesen Beitrag gut

16 ShadowLupina

Zitat von Jörg


RewriteCond %{THE_REQUEST} !ncr=1
RewriteCond %{HTTP_HOST} ^www\.mainbrick\.com$
RewriteRule ^$ http://www.mainbrick.com/?ncr=1 [R=302,L]


Dann bekomm ich einen Fehler das die Weiterleitung nie beendet wird

das mit den includierten phps schau ich mir mal an

29.11.2013 10:56

17 ShadowLupina

Ne tschuldigung weiterleitung passt...da hatte sich ne raute für die abfrage nach dem ?ncr=1 geschlichen

29.11.2013 10:57

18 ShadowLupina

Also das ist die einzige php datei die ich gefunden habe, die was mit dem infoportal von mainbrick zu tun hat

<?php  return array (
  'resourceClass' => 'modDocument',
  'resource' => 
  array (
    'id' => 176,
    'type' => 'document',
    'contentType' => 'text/html',
    'pagetitle' => 'Page was not found',
    'longtitle' => '',
    'description' => '',
    'alias' => 'int/page-was-not-found',
    'link_attributes' => '',
    'published' => 1,
    'pub_date' => 0,
    'unpub_date' => 0,
    'parent' => 0,
    'isfolder' => 0,
    'introtext' => '',
    'content' => '<tex>

The page was not found!

Go to "Homepage":[[~143]]?ncr=1

</tex>',
    'richtext' => 1,
    'template' => 4,
    'menuindex' => 8,
    'searchable' => 1,
    'cacheable' => 1,
    'createdby' => 1,
    'createdon' => 1376822492,
    'editedby' => 1,
    'editedon' => 1376822604,
    'deleted' => 0,
    'deletedon' => 0,
    'deletedby' => 0,
    'publishedon' => 1376822520,
    'publishedby' => 1,
    'menutitle' => '',
    'donthit' => 0,
    'privateweb' => 0,
    'privatemgr' => 0,
    'content_dispo' => 0,
    'hidemenu' => 1,
    'class_key' => 'modDocument',
    'context_key' => 'com',
    'content_type' => 1,
    'uri' => 'int/page-was-not-found.html',
    'uri_override' => 0,
    'meta_description' => 
    array (
      0 => 'meta_description',
      1 => '',
      2 => 'default',
      3 => NULL,
      4 => 'text',
    ),
    'meta_keywords' => 
    array (
      0 => 'meta_keywords',
      1 => '',
      2 => 'default',
      3 => NULL,
      4 => 'text',
    ),
    '_content' => '<!DOCTYPE html>

<html lang="en">
<head>
   <base href="http://www.mainbrick.com/" />
   <title>Page was not found</title>
   <link rel="canonical" href="http://www.mainbrick.com/int/page-was-not-found.html" />
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <meta name="robots" content="index, follow" />
   <meta name="keywords" content="" />
   <meta name="description" content="" />
   <meta name="generator" content="MODx Revolution CMS" />
   <script type="text/javascript">document.documentElement.className="js"</script>
   <link rel="stylesheet" type="text/css" href="/assets/templates/mainbrickhp/css/style.css" media="screen, projection" />
   <link rel="stylesheet" type="text/css" href="/assets/templates/mainbrickhp/fancybox/jquery.fancybox-1.3.4.css" media="screen" />
</head>

<!-- -------------------------------------------------------------------- -->
<!-- Site by AXIOM 3, Handcrafted Design and Development - info@axiom3.de -->
<!-- -------------------------------------------------------------------- -->

<body class="layout-m lang-en">
   <div id="header" class="wrapper group">
      <div id="country-selector">
         International <a href="/start.html">(select country)</a>
      </div>
      
      <div id="logo">
         <a href="http://www.mainbrick.com/">Mainbrick</a>
      </div>
      
      <div id="top-nav">
         <ul class="group"><li class="first">
   <a href="http://www.mainbrick.com/" title="Homepage"><span>Homepage</span></a>
   
</li>
<li>
   <a href="int/info.html" title="Info"><span>Info</span></a>
   
</li>
<li>
   <a href="int/products.html" title="Products"><span>Products</span></a>
   
</li>
<li>
   <a href="int/about-us.html" title="About us"><span>About us</span></a>
   
</li>
<li>
   <a href="int/contact.html" title="Contact"><span>Contact</span></a>
   
</li>
<li class="last">
   <a href="http://www.mainbrick.com/shop/" title="Online Shop"><span>Online Shop</span></a>
   
</li>
</ul>
      </div>
   </div>

<div id="content" class="wrapper group">
   <div id="main-column">
      <h1>Page was not found</h1>
      	<p>The page was not found!</p>

	<p>Go to <a href="http://www.mainbrick.com/?ncr=1">Homepage</a></p>


   </div>
</div>

   <div id="footer" class="wrapper">
      <div id="footer-nav">
        <ul><li class="first">
   <a href="int/imprint.html" title="Imprint"><span>Imprint</span></a>
   
</li>
<li class="last">
   <a href="int/privacy-policy.html" title="Privacy policy"><span>Privacy policy</span></a>
   
</li>
</ul>
        <p style="text-align:right">Copyright 2011 Mainbrick.com<br> <a href="http://www.ontecmedia.com/">Webdesign by On-Tec-Media</a></p>
        
      </div>
   </div>

<script src="/assets/templates/mainbrickhp/js/jquery-1.5.1.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="vfancybox/jquery.mousewheel-3.0.4.pack.js"></script>
<script type="text/javascript" src="/assets/templates/mainbrickhp/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<script src="/assets/templates/mainbrickhp/js/jquery.presenter.js" type="text/javascript" charset="utf-8"></script>

<script src="/assets/templates/mainbrickhp/js/jquery.equalheight.js" type="text/javascript" charset="utf-8"></script>

<script src="/assets/templates/mainbrickhp/js/base.js" type="text/javascript" charset="utf-8"></script>

<script src="/assets/templates/mainbrickhp/js/emos2.js" type="text/javascript" charset="utf-8"></script>
[[*statistics]]

</body>

</html>',
  ),
  'contentType' => 
  array (
    'id' => 1,
    'name' => 'HTML',
    'description' => 'HTML content',
    'mime_type' => 'text/html',
    'file_extensions' => '.html',
    'headers' => NULL,
    'binary' => 0,
  ),
  'policyCache' => 
  array (
  ),
  'elementCache' => 
  array (
    '[[*pagetitle]]' => 'Page was not found',
    '[[*longtitle:default=`Page was not found`]]' => 'Page was not found',
    '[[*id]]' => 176,
    '[[~176]]' => 'int/page-was-not-found.html',
    '[[canonical]]' => '<link rel="canonical" href="http://www.mainbrick.com/int/page-was-not-found.html" />',
    '[[*meta_keywords]]' => '',
    '[[*meta_description]]' => '',
    '[[Wayfinder? &outerClass=`group` &excludeDocs=`168,173`  &startId=`0` &rowTpl=`menu_item` &level=`1` &hereTpl=`menu_item_active`]]' => '<ul class="group"><li class="first">
   <a href="http://www.mainbrick.com/" title="Homepage"><span>Homepage</span></a>
   
</li>
<li>
   <a href="int/info.html" title="Info"><span>Info</span></a>
   
</li>
<li>
   <a href="int/products.html" title="Products"><span>Products</span></a>
   
</li>
<li>
   <a href="int/about-us.html" title="About us"><span>About us</span></a>
   
</li>
<li>
   <a href="int/contact.html" title="Contact"><span>Contact</span></a>
   
</li>
<li class="last">
   <a href="http://www.mainbrick.com/shop/" title="Online Shop"><span>Online Shop</span></a>
   
</li>
</ul>',
    '[[$header]]' => '<!DOCTYPE html>

<html lang="en">
<head>
   <base href="http://www.mainbrick.com/" />
   <title>Page was not found</title>
   <link rel="canonical" href="http://www.mainbrick.com/int/page-was-not-found.html" />
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <meta name="robots" content="index, follow" />
   <meta name="keywords" content="" />
   <meta name="description" content="" />
   <meta name="generator" content="MODx Revolution CMS" />
   <script type="text/javascript">document.documentElement.className="js"</script>
   <link rel="stylesheet" type="text/css" href="/assets/templates/mainbrickhp/css/style.css" media="screen, projection" />
   <link rel="stylesheet" type="text/css" href="/assets/templates/mainbrickhp/fancybox/jquery.fancybox-1.3.4.css" media="screen" />
</head>

<!-- -------------------------------------------------------------------- -->
<!-- Site by AXIOM 3, Handcrafted Design and Development - info@axiom3.de -->
<!-- -------------------------------------------------------------------- -->

<body class="layout-m lang-en">
   <div id="header" class="wrapper group">
      <div id="country-selector">
         International <a href="/start.html">(select country)</a>
      </div>
      
      <div id="logo">
         <a href="http://www.mainbrick.com/">Mainbrick</a>
      </div>
      
      <div id="top-nav">
         <ul class="group"><li class="first">
   <a href="http://www.mainbrick.com/" title="Homepage"><span>Homepage</span></a>
   
</li>
<li>
   <a href="int/info.html" title="Info"><span>Info</span></a>
   
</li>
<li>
   <a href="int/products.html" title="Products"><span>Products</span></a>
   
</li>
<li>
   <a href="int/about-us.html" title="About us"><span>About us</span></a>
   
</li>
<li>
   <a href="int/contact.html" title="Contact"><span>Contact</span></a>
   
</li>
<li class="last">
   <a href="http://www.mainbrick.com/shop/" title="Online Shop"><span>Online Shop</span></a>
   
</li>
</ul>
      </div>
   </div>',
    '[[~143]]' => 'http://www.mainbrick.com/',
    '[[*content:textile]]' => '	<p>The page was not found!</p>

	<p>Go to <a href="http://www.mainbrick.com/?ncr=1">Homepage</a></p>

',
    '[[Wayfinder? &includeDocs=`168,173` &startId=`0` &rowTpl=`menu_item` &hereTpl=`menu_item_active`]]' => '<ul><li class="first">
   <a href="int/imprint.html" title="Imprint"><span>Imprint</span></a>
   
</li>
<li class="last">
   <a href="int/privacy-policy.html" title="Privacy policy"><span>Privacy policy</span></a>
   
</li>
</ul>',
    '[[$footer]]' => '   <div id="footer" class="wrapper">
      <div id="footer-nav">
        <ul><li class="first">
   <a href="int/imprint.html" title="Imprint"><span>Imprint</span></a>
   
</li>
<li class="last">
   <a href="int/privacy-policy.html" title="Privacy policy"><span>Privacy policy</span></a>
   
</li>
</ul>
        <p style="text-align:right">Copyright 2011 Mainbrick.com<br> <a href="http://www.ontecmedia.com/">Webdesign by On-Tec-Media</a></p>
        
      </div>
   </div>

<script src="/assets/templates/mainbrickhp/js/jquery-1.5.1.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="vfancybox/jquery.mousewheel-3.0.4.pack.js"></script>
<script type="text/javascript" src="/assets/templates/mainbrickhp/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<script src="/assets/templates/mainbrickhp/js/jquery.presenter.js" type="text/javascript" charset="utf-8"></script>

<script src="/assets/templates/mainbrickhp/js/jquery.equalheight.js" type="text/javascript" charset="utf-8"></script>

<script src="/assets/templates/mainbrickhp/js/base.js" type="text/javascript" charset="utf-8"></script>

<script src="/assets/templates/mainbrickhp/js/emos2.js" type="text/javascript" charset="utf-8"></script>
[[*statistics]]

</body>

</html>',
  ),
  'sourceCache' => 
  array (
    'modChunk' => 
    array (
      'header' => 
      array (
        'fields' => 
        array (
          'id' => 1,
          'name' => 'header',
          'description' => '',
          'editor_type' => 0,
          'category' => 0,
          'cache_type' => 0,
          'snippet' => '<!DOCTYPE html>

<html lang="[[++cultureKey]]">
<head>
   <base href="[[++site_url]]" />
   <title>[[*longtitle:default=`[[*pagetitle]]`]]</title>
   [[canonical]]
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <meta name="robots" content="index, follow" />
   <meta name="keywords" content="[[*meta_keywords]]" />
   <meta name="description" content="[[*meta_description]]" />
   <meta name="generator" content="MODx Revolution CMS" />
   <script type="text/javascript">document.documentElement.className="js"</script>
   <link rel="stylesheet" type="text/css" href="[[++assets_url]]templates/mainbrickhp/css/style.css" media="screen, projection" />
   <link rel="stylesheet" type="text/css" href="[[++assets_url]]templates/mainbrickhp/fancybox/jquery.fancybox-1.3.4.css" media="screen" />
</head>

<!-- -------------------------------------------------------------------- -->
<!-- Site by AXIOM 3, Handcrafted Design and Development - info@axiom3.de -->
<!-- -------------------------------------------------------------------- -->

<body class="[[+bodyclass:default=`layout-m`]] lang-[[++cultureKey]]">
   <div id="header" class="wrapper group">
      <div id="country-selector">
         [[++mb_country_name]] <a href="/start.html">(select country)</a>
      </div>
      
      <div id="logo">
         <a href="[[++site_url]]">Mainbrick</a>
      </div>
      
      <div id="top-nav">
         [[Wayfinder? &outerClass=`group` &excludeDocs=`[[++footer_menu_docs]]`  &startId=`0` &rowTpl=`menu_item` &level=`1` &hereTpl=`menu_item_active`]]
      </div>
   </div>',
          'locked' => false,
          'properties' => 
          array (
          ),
        ),
        'policies' => 
        array (
          'com' => 
          array (
          ),
        ),
      ),
      'footer' => 
      array (
        'fields' => 
        array (
          'id' => 2,
          'name' => 'footer',
          'description' => '',
          'editor_type' => 0,
          'category' => 0,
          'cache_type' => 0,
          'snippet' => '   <div id="footer" class="wrapper">
      <div id="footer-nav">
        [[Wayfinder? &includeDocs=`[[++footer_menu_docs]]` &startId=`0` &rowTpl=`menu_item` &hereTpl=`menu_item_active`]]
        <p style="text-align:right">Copyright 2011 Mainbrick.com<br> <a href="http://www.ontecmedia.com/">Webdesign by On-Tec-Media</a></p>
        
      </div>
   </div>

<script src="[[++assets_url]]templates/mainbrickhp/js/jquery-1.5.1.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="vfancybox/jquery.mousewheel-3.0.4.pack.js"></script>
<script type="text/javascript" src="[[++assets_url]]templates/mainbrickhp/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<script src="[[++assets_url]]templates/mainbrickhp/js/jquery.presenter.js" type="text/javascript" charset="utf-8"></script>

<script src="[[++assets_url]]templates/mainbrickhp/js/jquery.equalheight.js" type="text/javascript" charset="utf-8"></script>

<script src="[[++assets_url]]templates/mainbrickhp/js/base.js" type="text/javascript" charset="utf-8"></script>

<script src="[[++assets_url]]templates/mainbrickhp/js/emos2.js" type="text/javascript" charset="utf-8"></script>
[[*statistics]]

</body>

</html>',
          'locked' => false,
          'properties' => 
          array (
          ),
        ),
        'policies' => 
        array (
          'com' => 
          array (
          ),
        ),
      ),
    ),
    'modSnippet' => 
    array (
      'canonical' => 
      array (
        'fields' => 
        array (
          'id' => 9,
          'name' => 'Canonical',
          'description' => 'Adds a canonical tag in templates',
          'editor_type' => 0,
          'category' => 2,
          'cache_type' => 0,
          'snippet' => '/* Canonical snippet */
/* Author Bob Ray */
/* produces an appropriate canonical tag for home and other pages */
/* put the snippet tag [[Canonical]]  in the <head> section of your template(s) */
return $modx->resource->id == $modx->getOption(\'site_start\') ? \'<link rel="canonical" href="[[++site_url]]" />\' : \'<link rel="canonical" href="[[++site_url]][[~[[*id]]]]" />\';',
          'locked' => false,
          'properties' => 
          array (
          ),
          'moduleguid' => '',
        ),
        'policies' => 
        array (
          'com' => 
          array (
          ),
        ),
      ),
      'Wayfinder' => 
      array (
        'fields' => 
        array (
          'id' => 7,
          'name' => 'Wayfinder',
          'description' => 'Wayfinder for MODx Revolution 2.0.0-beta-5 and later.',
          'editor_type' => 0,
          'category' => 0,
          'cache_type' => 0,
          'snippet' => '/**
 * Wayfinder Snippet to build site navigation menus
 *
 * Totally refactored from original DropMenu nav builder to make it easier to
 * create custom navigation by using chunks as output templates. By using
 * templates, many of the paramaters are no longer needed for flexible output
 * including tables, unordered- or ordered-lists (ULs or OLs), definition lists
 * (DLs) or in any other format you desire.
 *
 * @version 2.1.1-beta5
 * @author Garry Nutting (collabpad.com)
 * @author Kyle Jaebker (muddydogpaws.com)
 * @author Ryan Thrash (modx.com)
 * @author Shaun McCormick (modx.com)
 * @author Jason Coward (modx.com)
 *
 * @example [[Wayfinder? &startId=`0`]]
 *
 */
$wayfinder_base = $modx->getOption(\'wayfinder.core_path\',$scriptProperties,$modx->getOption(\'core_path\').\'components/wayfinder/\');

/* include a custom config file if specified */
if (isset($scriptProperties[\'config\'])) {
    $scriptProperties[\'config\'] = str_replace(\'../\',\'\',$scriptProperties[\'config\']);
    $scriptProperties[\'config\'] = $wayfinder_base.\'configs/\'.$scriptProperties[\'config\'].\'.config.php\';
} else {
    $scriptProperties[\'config\'] = $wayfinder_base.\'configs/default.config.php\';
}
if (file_exists($scriptProperties[\'config\'])) {
    include_once $scriptProperties[\'config\'];
}

/* include wayfinder class */
include_once $wayfinder_base.\'wayfinder.class.php\';
if (!$modx->loadClass(\'Wayfinder\',$wayfinder_base,true,true)) {
    return \'error: Wayfinder class not found\';
}
$wf = new Wayfinder($modx,$scriptProperties);

/* get user class definitions
 * TODO: eventually move these into config parameters */
$wf->_css = array(
    \'first\' => isset($firstClass) ? $firstClass : \'\',
    \'last\' => isset($lastClass) ? $lastClass : \'last\',
    \'here\' => isset($hereClass) ? $hereClass : \'active\',
    \'parent\' => isset($parentClass) ? $parentClass : \'\',
    \'row\' => isset($rowClass) ? $rowClass : \'\',
    \'outer\' => isset($outerClass) ? $outerClass : \'\',
    \'inner\' => isset($innerClass) ? $innerClass : \'\',
    \'level\' => isset($levelClass) ? $levelClass: \'\',
    \'self\' => isset($selfClass) ? $selfClass : \'\',
    \'weblink\' => isset($webLinkClass) ? $webLinkClass : \'\'
);

/* get user templates
 * TODO: eventually move these into config parameters */
$wf->_templates = array(
    \'outerTpl\' => isset($outerTpl) ? $outerTpl : \'\',
    \'rowTpl\' => isset($rowTpl) ? $rowTpl : \'\',
    \'parentRowTpl\' => isset($parentRowTpl) ? $parentRowTpl : \'\',
    \'parentRowHereTpl\' => isset($parentRowHereTpl) ? $parentRowHereTpl : \'\',
    \'hereTpl\' => isset($hereTpl) ? $hereTpl : \'\',
    \'innerTpl\' => isset($innerTpl) ? $innerTpl : \'\',
    \'innerRowTpl\' => isset($innerRowTpl) ? $innerRowTpl : \'\',
    \'innerHereTpl\' => isset($innerHereTpl) ? $innerHereTpl : \'\',
    \'activeParentRowTpl\' => isset($activeParentRowTpl) ? $activeParentRowTpl : \'\',
    \'categoryFoldersTpl\' => isset($categoryFoldersTpl) ? $categoryFoldersTpl : \'\',
    \'startItemTpl\' => isset($startItemTpl) ? $startItemTpl : \'\'
);

/* process Wayfinder */
$output = $wf->run();
if ($wf->_config[\'debug\']) {
    $output .= $wf->renderDebugOutput();
}

/* output results */
if ($wf->_config[\'ph\']) {
    $modx->setPlaceholder($wf->_config[\'ph\'],$output);
} else {
    return $output;
}',
          'locked' => false,
          'properties' => 
          array (
            'level' => 
            array (
              'name' => 'level',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => '0',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'includeDocs' => 
            array (
              'name' => 'includeDocs',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => '0',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'excludeDocs' => 
            array (
              'name' => 'excludeDocs',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => '0',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'contexts' => 
            array (
              'name' => 'contexts',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => '',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'cacheResults' => 
            array (
              'name' => 'cacheResults',
              'desc' => '',
              'type' => 'combo-boolean',
              'options' => '',
              'value' => true,
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'cacheTime' => 
            array (
              'name' => 'cacheTime',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => 3600,
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'ph' => 
            array (
              'name' => 'ph',
              'desc' => '',
              'type' => 'combo-boolean',
              'options' => '',
              'value' => false,
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'debug' => 
            array (
              'name' => 'debug',
              'desc' => '',
              'type' => 'combo-boolean',
              'options' => '',
              'value' => false,
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'ignoreHidden' => 
            array (
              'name' => 'ignoreHidden',
              'desc' => '',
              'type' => 'combo-boolean',
              'options' => '',
              'value' => false,
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'hideSubMenus' => 
            array (
              'name' => 'hideSubMenus',
              'desc' => '',
              'type' => 'combo-boolean',
              'options' => '',
              'value' => false,
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'useWeblinkUrl' => 
            array (
              'name' => 'useWeblinkUrl',
              'desc' => '',
              'type' => 'combo-boolean',
              'options' => '',
              'value' => true,
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'fullLink' => 
            array (
              'name' => 'fullLink',
              'desc' => '',
              'type' => 'combo-boolean',
              'options' => '',
              'value' => false,
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'scheme' => 
            array (
              'name' => 'scheme',
              'desc' => '',
              'type' => 'list',
              'options' => 
              array (
                0 => 
                array (
                  'text' => '',
                  'value' => '',
                  'name' => '',
                ),
                1 => 
                array (
                  'text' => 'abs',
                  'value' => 'abs',
                  'name' => 'abs',
                ),
                2 => 
                array (
                  'text' => 'full',
                  'value' => 'full',
                  'name' => 'full',
                ),
              ),
              'value' => '',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'sortOrder' => 
            array (
              'name' => 'sortOrder',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => 'ASC',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'sortBy' => 
            array (
              'name' => 'sortBy',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => 'menuindex',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'limit' => 
            array (
              'name' => 'limit',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => '0',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'cssTpl' => 
            array (
              'name' => 'cssTpl',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => false,
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'jsTpl' => 
            array (
              'name' => 'jsTpl',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => false,
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'rowIdPrefix' => 
            array (
              'name' => 'rowIdPrefix',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => false,
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'textOfLinks' => 
            array (
              'name' => 'textOfLinks',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => 'menutitle',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'titleOfLinks' => 
            array (
              'name' => 'titleOfLinks',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => 'pagetitle',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'displayStart' => 
            array (
              'name' => 'displayStart',
              'desc' => '',
              'type' => 'combo-boolean',
              'options' => '',
              'value' => false,
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'firstClass' => 
            array (
              'name' => 'firstClass',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => 'first',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'lastClass' => 
            array (
              'name' => 'lastClass',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => 'last',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'hereClass' => 
            array (
              'name' => 'hereClass',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => 'active',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'parentClass' => 
            array (
              'name' => 'parentClass',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => '',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'rowClass' => 
            array (
              'name' => 'rowClass',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => '',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'outerClass' => 
            array (
              'name' => 'outerClass',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => '',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'innerClass' => 
            array (
              'name' => 'innerClass',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => '',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'levelClass' => 
            array (
              'name' => 'levelClass',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => '',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'selfClass' => 
            array (
              'name' => 'selfClass',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => '',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'webLinkClass' => 
            array (
              'name' => 'webLinkClass',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => '',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'outerTpl' => 
            array (
              'name' => 'outerTpl',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => '',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'rowTpl' => 
            array (
              'name' => 'rowTpl',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => '',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'parentRowTpl' => 
            array (
              'name' => 'parentRowTpl',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => '',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'parentRowHereTpl' => 
            array (
              'name' => 'parentRowHereTpl',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => '',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'hereTpl' => 
            array (
              'name' => 'hereTpl',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => '',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'innerTpl' => 
            array (
              'name' => 'innerTpl',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => '',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'innerRowTpl' => 
            array (
              'name' => 'innerRowTpl',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => '',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'innerHereTpl' => 
            array (
              'name' => 'innerHereTpl',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => '',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'activeParentRowTpl' => 
            array (
              'name' => 'activeParentRowTpl',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => '',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'categoryFoldersTpl' => 
            array (
              'name' => 'categoryFoldersTpl',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => '',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'startItemTpl' => 
            array (
              'name' => 'startItemTpl',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => '',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'permissions' => 
            array (
              'name' => 'permissions',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => 'list',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'hereId' => 
            array (
              'name' => 'hereId',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => '',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'where' => 
            array (
              'name' => 'where',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => '',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
            'templates' => 
            array (
              'name' => 'templates',
              'desc' => '',
              'type' => 'textfield',
              'options' => '',
              'value' => '',
              'lexicon' => NULL,
              'desc_trans' => '',
            ),
          ),
          'moduleguid' => '',
        ),
        'policies' => 
        array (
          'com' => 
          array (
          ),
        ),
      ),
      'textile' => 
      array (
        'fields' => 
        array (
          'id' => 15,
          'name' => 'textile',
          'description' => '',
          'editor_type' => 0,
          'category' => 0,
          'cache_type' => 0,
          'snippet' => '$classTextile = $modx->config["base_path"].\'assets/plugins/textile/classTextile.php\';
        if (file_exists($classTextile)) {
            include_once($classTextile);
            $textile = new Textile();
            $doc = $scriptProperties[\'input\'];
            preg_match_all("|<tex>(.*)</tex>|Uis",$doc,$matches);
            for ($i=0;$i<count($matches[0]);$i++) {
                $tag = $matches[0][$i];
                $text = $textile->TextileThis($matches[1][$i]);
                $doc = str_replace($tag,$text,$doc);
            }
            return $doc;
        }',
          'locked' => false,
          'properties' => 
          array (
          ),
          'moduleguid' => '',
        ),
        'policies' => 
        array (
          'com' => 
          array (
          ),
        ),
      ),
    ),
    'modTemplateVar' => 
    array (
      'meta_keywords' => 
      array (
        'fields' => 
        array (
          'id' => 2,
          'type' => 'text',
          'name' => 'meta_keywords',
          'caption' => 'meta_keywords',
          'description' => '',
          'editor_type' => 0,
          'category' => 0,
          'locked' => false,
          'elements' => '',
          'rank' => 0,
          'display' => 'default',
          'default_text' => '',
          'properties' => 
          array (
          ),
          'input_properties' => 
          array (
            'allowBlank' => 'true',
            'maxLength' => '',
            'minLength' => '',
          ),
          'output_properties' => 
          array (
          ),
        ),
        'policies' => 
        array (
          'com' => 
          array (
          ),
        ),
      ),
      'meta_description' => 
      array (
        'fields' => 
        array (
          'id' => 1,
          'type' => 'text',
          'name' => 'meta_description',
          'caption' => 'meta_description',
          'description' => '',
          'editor_type' => 0,
          'category' => 0,
          'locked' => false,
          'elements' => '',
          'rank' => 0,
          'display' => 'default',
          'default_text' => '',
          'properties' => 
          array (
          ),
          'input_properties' => 
          array (
            'allowBlank' => 'true',
            'maxLength' => '',
            'minLength' => '',
          ),
          'output_properties' => 
          array (
          ),
        ),
        'policies' => 
        array (
          'com' => 
          array (
          ),
        ),
      ),
    ),
  ),
);

Heißt 176.cache.php

die andere datei wäre die header.php die ich store - files verzeichnis liegt und nur für den shop gilt? Beim Shop läuft aber alles...also kann es da ja nicht sein?

29.11.2013 12:25

19 ShadowLupina

Also ich lass die mainbrick seite erst mal unter der weiterleitung laufen...und versuche jetzt das problem bei der ontecmedia seite zu beheben,,weil es da nicht ganz so tragisch , wenn die etwas länger lädt

Ich hab jetzt in die index.php von ontecmedia seite denn zeitmesser code eingeführt..sehe aber immer noch nix.,...immer noch was falsch?
<?php
/*
 * MODx Revolution
 *
 * Copyright 2006-2010 by the MODx Team.
 * All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation; either version 2 of the License, or (at your option) any later
 * version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
 * Place, Suite 330, Boston, MA 02111-1307 USA
 *
 */
//Teststart
function microtime_float()
{
    list($usec, $sec) = explode(" ", microtime());
    return ((float)$usec + (float)$sec);
}

$time_start = microtime_float();

$mtime= microtime();
$mtime= explode(" ", $mtime);
$mtime= $mtime[1] + $mtime[0];
$tstart= $mtime;

error_reporting(E_ALL & ~E_NOTICE);

/**
 * @deprecated 2.0.0
 * For backward compatibility with MODx 0.9.x
 */
define("IN_PARSER_MODE", "true");
/**
 * @deprecated 2.0.0
 * For backward compatibility with MODx 0.9.x
 */
define("IN_MANAGER_MODE", false);

/* define this as true in another entry file, then include this file to simply access the API
 * without executing the MODx request handler */
if (!defined('MODX_API_MODE')) {
    define('MODX_API_MODE', false);
}

/* this can be used to disable caching in MODx absolutely */
$modx_cache_disabled= false;

/* include custom core config and define core path */
@include(dirname(__FILE__) . '/config.core.php');
if (!defined('MODX_CORE_PATH')) define('MODX_CORE_PATH', dirname(__FILE__) . '/core/');

/* include the modX class */
if (!@include_once (MODX_CORE_PATH . "model/modx/modx.class.php")) {
    $errorMessage = 'Site temporarily unavailable';
    @include(MODX_CORE_PATH . 'error/unavailable.include.php');
    header('HTTP/1.1 503 Service Unavailable');
    echo "<html><title>Error 503: Site temporarily unavailable</title><body><h1>Error 503</h1><p>{$errorMessage}</p></body></html>";
    exit();
}

/* start output buffering */
ob_start();

/* Create an instance of the modX class */
if (empty($options) || !is_array($options)) $options = array();
$modx= new modX('', $options);
if (!is_object($modx) || !($modx instanceof modX)) {
    @ob_end_flush();
    $errorMessage = '<a href="setup/">MODx not installed. Install now?</a>';
    @include(MODX_CORE_PATH . 'error/unavailable.include.php');
    header('HTTP/1.1 503 Service Unavailable');
    echo "<html><title>Error 503: Site temporarily unavailable</title><body><h1>Error 503</h1><p>{$errorMessage}</p></body></html>";
    exit();
}

/* Set the actual start time */
$modx->startTime= $tstart;

/* Set additional logging options including level and target: */
$modx->setLogLevel(modX::LOG_LEVEL_ERROR);
$modx->setLogTarget('FILE');

/* Set debugging mode (i.e. error_reporting): */
$modx->setDebug(E_ALL & ~E_NOTICE);

/* Initialize the default 'web' context */
$modx->initialize('web');

/* execute the request handler */
if (!MODX_API_MODE) {
    $modx->handleRequest();
	
		
	
}

//Testende
$time_end = microtime_float();
$time = $time_end - $time_start;

echo "$time Sekunden Laufzeit\n";

29.11.2013 14:01

20 Jörg Kruse

In der 176.cache.php finden sich nur Verlinkungen mit diesem Parameter.

Für die Ursachenfindung relevant sind if oder case Blöcke, die den Parameter ncr berücksichtigen. Es geht ja darum herauszufinden, was passiert, wenn ncr != 1, denn dieses ist für die lange Laufzeit des Scriptes verantwortlich

die andere datei wäre die header.php die ich store - files verzeichnis liegt und nur für den shop gilt?

Was heißt "gilt"? header.php klingt schon danach, als ob diese Datei einen Header baut, welcher in jeder Seite benötigt wird, also auch in der Startseite.

Ich hab jetzt in die index.php von ontecmedia seite denn zeitmesser code eingeführt..sehe aber immer noch nix.,...immer noch was falsch?

Möglicherweise beendet in einer includierten Datei ein exit() oder die() das Script vorzeitig - dann musst du das Ende der Zeitmessung davor einfügen.

PS:
Wie ich gerade sehe, hat die index.php anscheinend eine eigene Zeitmessung:

$mtime= microtime();
$mtime= explode(" ", $mtime);
$mtime= $mtime[1] + $mtime[0];
$tstart= $mtime;

/* Set the actual start time */
$modx->startTime= $tstart;

Da würde ich mal schauen, ob dort irgendwo dokumentiert ist, wie man diese interne Zeitmessung aktiviert. Dann muss man nicht mit der externen Zeitmessung hantieren.

29.11.2013 14:54