Тема: Fatal error: Call to a member function segment()
Здравствуйте.
После переноса сайта при обращении к главной странице получаю ошибку.
Fatal error: Call to a member function segment() on null in /hsphere/local/home/....../system/cache/templates_c/5baa5420e597357b453fac0c3966f5d9.php on line 33
32 <?php endif; ?>
33 <?php if($CI->uri->segment(1) == MY_Controller::getCurrentLocale()): ?>
34 <?php $lang = '/' . \MY_Controller::getCurrentLocale()?>
35 <?php else:?>
36 <?php $lang = ''?>
37 <?php endif; ?>
38 <?php if($CI->uri->segment(2) == 'profile' || $CI->uri->segment(1) == 'wishlist'): ?>
39 <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"/>
40 <?php endif; ?>
var_dump($CI->uri ) ничего не выводит.
Другие страницы сайта работают, админка работает.
.htaccess
AddDefaultCharset UTF-8
<IfModule mod_php5.c>
php_value mbstring.internal_encoding UTF-8
</IfModule>
Options +FollowSymLinks
Options -Indexes
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
<ifModule pagespeed_module>
Modpagespeed off
</ifModule>
#apache2ctl -M && sudo a2enmod expires && sudo service apache2 restart (to enable mod_expires on ubuntu)
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access 7 days"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/x-icon "access 1 year"
ExpiresByType application/x-shockwave-flash "access 1 year"
ExpiresByType application/javascript "access 1 year"
ExpiresByType application/x-javascript "access 1 year"
ExpiresByType text/css "access 1 year"
ExpiresByType text/html "access 1 year"
</IfModule>
RewriteRule ^(.*)\.tpl$ [R=404]
RewriteRule ^(.*)backups(.*)\.zip$ [R=404]
RewriteCond $1 !^(index\.php|assets/.*|uploads/.*|application/third_party/(tinymce|filemanager|studio-42).*|favicon\.ico|favicon\.png|captcha/.*|application/.*/templates|application/.*/assets/js|application/
.*/assets/css|application/.*/assets/images|CHANGELOG.xml|templates|js|application/modules/update/UpdateService.wsdl|adminer.php)
RewriteRule ^(.*)$ /index.php/$1 [L]
Версия: 4.11 Premium
PHP 5.6 работает в режиме FastCGI
Пробовал устанавливать 4.8, 4.10 работают без проблем.
Версия 4.11 сразу после установки даёт ошибку. Версия 4.12 после установки также некорректно отображается основная страница магазина: не подгружаются стили, картинки и т.п.
A PHP Error was encountered
Severity: 4096
Message: Argument 1 passed to CMSFactory\Tree\TreeCollection::__construct() must be an instance of Propel\Runtime\Collection\ObjectCollection, boolean given, called in /hsphere/local/home/sevenkmopt/qwerty411.7kmopt.com.ua/application/modules/shop/classes/Category/STreeMenu.php on line 165 and defined
Filename: Tree/TreeCollection.php
Line Number: 15