Jump to content
Sign in to follow this  
Indchubaka

Ошибка 500

Recommended Posts

Версия: v4.3.6 NULLED

Когда добавляешь любой виджет на страницу из базы данных, после обновления кеша эта страница начинает выдавать ошибку 500.

PHP Fatal error:  Call to a member function setQueryString() on null in /www/forum/applications/cms/sources/Theme/Theme.php(611) : eval()'d code on line 49
PHP Stack trace:
PHP   1. {main}() /www/forum/index.php:0
PHP   2. IPS\_Dispatcher->run() /www/forum/index.php:13
PHP   3. IPS\cms\modules\front\pages\_page->execute() /www/forum/system/Dispatcher/Dispatcher.php:146
PHP   4. IPS\Dispatcher\_Controller->execute() /www/forum/applications/cms/modules/front/pages/page.php:33
PHP   5. IPS\cms\modules\front\pages\_page->manage() /www/forum/system/Dispatcher/Controller.php:96
PHP   6. IPS\cms\modules\front\pages\_page->view() /www/forum/applications/cms/modules/front/pages/page.php:43
PHP   7. IPS\cms\Pages\_Page->output() /www/forum/applications/cms/modules/front/pages/page.php:73
PHP   8. IPS\cms\Pages\_Page->getHtmlContent() /www/forum/applications/cms/sources/Pages/Page.php:2198
PHP   9. call_user_func:{/www/forum/applications/cms/sources/Pages/Page.php:1218}() /www/forum/applications/cms/sources/Pages/Page.php:1218
PHP  10. IPS\Theme\content_pages_3() /www/forum/applications/cms/sources/Pages/Page.php:1218
PHP  11. IPS\cms\Databases\_Dispatcher->run() /www/forum/system/Theme/Theme.php(4319) : eval()'d code:9
PHP  12. IPS\Dispatcher\_Controller->execute() /www/forum/applications/cms/sources/Databases/Dispatcher.php:325
PHP  13. IPS\cms\modules\front\database\_index->manage() /www/forum/system/Dispatcher/Controller.php:96
PHP  14. IPS\cms\modules\front\database\_index->view() /www/forum/applications/cms/modules/front/database/index.php:51
PHP  15. IPS\Theme\class_cms_database_category_index->index() /www/forum/applications/cms/modules/front/database/index.php:155
PHP  16. IPS\Theme\class_cms_database_category_index->categoryRow() /www/forum/applications/cms/sources/Theme/Theme.php(611) : eval()'d code:358

Проблемы непосредственно с файлом forum/datastore/cms_databases.*.php (я так и не понял от чего, наверное из-за того, что конец строки сгенерировался неправильного)

 

Помогите, пожалуйста.

Share this post


Link to post
Share on other sites

Обновился до версии 4.4.8 nulled с вашего сайта (и старая версия тоже была с вашего). Ошибка теперь появляется сразу же после захода на страницу базы данных. Главная страница форума и другие модули работают без проблем. Кеш в админке обновлял.

Error: Call to a member function setQueryString() on null (0)
#0 /var/www2/forum/applications/cms/sources/Theme/Theme.php(610) : eval()'d code(358): IPS\Theme\class_cms_database_category_index->categoryRow(Object(IPS\cms\Categories2))
#1 /var/www2/forum/applications/cms/modules/front/database/index.php(155): IPS\Theme\class_cms_database_category_index->index(Object(IPS\cms\Databases), Array, Object(IPS\Http\Url\Friendly))
#2 /var/www2/forum/applications/cms/modules/front/database/index.php(51): IPS\cms\modules\front\database\_index->view()
#3 /var/www2/forum/system/Dispatcher/Controller.php(96): IPS\cms\modules\front\database\_index->manage()
#4 /var/www2/forum/applications/cms/sources/Databases/Dispatcher.php(347): IPS\Dispatcher\_Controller->execute()
#5 /var/www2/forum/system/Theme/Theme.php(4316) : eval()'d code(9): IPS\cms\Databases\_Dispatcher->run()
#6 /var/www2/forum/applications/cms/sources/Pages/Page.php(1244): IPS\Theme\content_pages_3()
#7 /var/www2/forum/applications/cms/sources/Pages/Page.php(2227): IPS\cms\Pages\_Page->getHtmlContent()
#8 /var/www2/forum/applications/cms/modules/front/pages/page.php(112): IPS\cms\Pages\_Page->output()
#9 /var/www2/forum/applications/cms/modules/front/pages/page.php(43): IPS\cms\modules\front\pages\_page->view()
#10 /var/www2/forum/system/Dispatcher/Controller.php(96): IPS\cms\modules\front\pages\_page->manage()
#11 /var/www2/forum/applications/cms/modules/front/pages/page.php(33): IPS\Dispatcher\_Controller->execute()
#12 /var/www2/forum/system/Dispatcher/Dispatcher.php(152): IPS\cms\modules\front\pages\_page->execute()
#13 /var/www2/forum/index.php(13): IPS\_Dispatcher->run()
#14 {main}

1872223479_.thumb.jpg.19c9fd70bece0fa2bcc4cc2b8737a8b5.jpg

Share this post


Link to post
Share on other sites

После ребилда кеша, в forum/datastore/cms_databases.*.php почему-то выставляется database_page_id":0 - в этом и проблема. С database_page_id":3 страницу базы данных грузит. В таблице cms_databases database_id стоит 2.

 

 

Share this post


Link to post
Share on other sites

Не работающий файл forum/datastore/cms_databases.*.php

<?php

return <<<'VALUE'
{"2":{"database_id":2,"database_key":"tracker","database_record_count":0,"database_template_listing":"listing","database_template_display":"display","database_template_categories":"category_index","database_all_editable":0,"database_revisions":1,"database_field_title":"3","database_field_sort":"record_last_comment","database_field_direction":"desc","database_field_perpage":25,"database_comment_approve":0,"database_record_approve":0,"database_rss":0,"database_field_content":"4","database_comment_bump":2,"database_forum_record":0,"database_forum_comments":0,"database_forum_delete":0,"database_forum_forum":0,"database_forum_prefix":"","database_forum_suffix":"","database_search":1,"database_tags_enabled":1,"database_tags_noprefixes":1,"database_tags_predefined":"","database_fixed_field_perms":"{\"record_image\":{\"visible\":false,\"perm_view\":\"*\",\"perm_2\":\"*\",\"perm_3\":\"*\"},\"record_publish_date\":{\"visible\":false},\"record_allow_comments\":{\"visible\":true}}","database_cat_index_type":0,"database_page_id":0,"database_template_form":"form","database_template_featured":"category_articles","database_featured_settings":"{\"featured\":false,\"perpage\":10,\"pagination\":false,\"sort\":\"record_publish_date\",\"direction\":\"desc\",\"categories\":0}","database_use_categories":1,"database_default_category":2,"database_options":17,"database_fixed_field_settings":"{\"record_image\":{\"image_dims\":[0,0],\"thumb_dims\":[200,200]}}","database_use_as_page_title":1,"database_canonical_flag":0,"perm_id":54,"perm_view":"*","perm_2":"*","perm_3":"4,8,13,6,3,9,12,11,14,15,16","perm_4":"4,13,12,11,14,15","perm_5":"4,8,13,6,3,9,12,11,14,15,16","perm_6":"4,8,13,6,3,9,12,11,14,15,16","perm_7":"4,8,13,6,3,9,12,11,14,15,16"}}
VALUE;

Все записи с cms_databases (1 запись)

INSERT INTO `cms_databases` (`database_id`, `database_key`, `database_record_count`, `database_template_listing`, `database_template_display`, `database_template_categories`, `database_all_editable`, `database_revisions`, `database_field_title`, `database_field_sort`, `database_field_direction`, `database_field_perpage`, `database_comment_approve`, `database_record_approve`, `database_rss`, `database_field_content`, `database_comment_bump`, `database_forum_record`, `database_forum_comments`, `database_forum_delete`, `database_forum_forum`, `database_forum_prefix`, `database_forum_suffix`, `database_search`, `database_tags_enabled`, `database_tags_noprefixes`, `database_tags_predefined`, `database_fixed_field_perms`, `database_cat_index_type`, `database_page_id`, `database_template_form`, `database_template_featured`, `database_featured_settings`, `database_use_categories`, `database_default_category`, `database_options`, `database_fixed_field_settings`, `database_use_as_page_title`, `database_canonical_flag`) VALUES ('2', 'tracker', '0', 'listing', 'display', 'category_index', '0', '1', '3', 'record_last_comment', 'desc', '25', '0', '0', '0', '4', '2', '0', '0', '0', '0', '', '', '1', '1', '1', '', '{\"record_image\":{\"visible\":false,\"perm_view\":\"*\",\"perm_2\":\"*\",\"perm_3\":\"*\"},\"record_publish_date\":{\"visible\":false},\"record_allow_comments\":{\"visible\":true}}', '0', '0', 'form', 'category_articles', '{\"featured\":false,\"perpage\":10,\"pagination\":false,\"sort\":\"record_publish_date\",\"direction\":\"desc\",\"categories\":0}', '1', '2', '17', '{\"record_image\":{\"image_dims\":[0,0],\"thumb_dims\":[200,200]}}', '1', '0');

 

Share this post


Link to post
Share on other sites

Обычно такая ошибка возникает в случае, если шаблон отображения базы данных был изменён, и при обновлении новые изменения не записываются, что и приводит к ошибке.

19 часов назад, Indchubaka сказал:

Решено.

Спасибо, что дал знать сообществу как решил.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×