Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

Ошибка при создании ситьи, категории ситьи. все что связано с блогом


Recommended Posts

При добавлении ситьи выдает ошибку:

Notice: Undefined index: tag in /home/x/xxx/xxxx/public_html/admin/model/blog/article.php on line 16Warning: Cannot modify header information - headers already sent by (output started at /home/x/xxx/xxxx/public_html/admin/controller/startup/error.php:34) in /home/x/xxx/xxxx/public_html/system/library/response.php on line 36

 

Link to comment
Share on other sites


31 минуту назад, VictorP сказал:

Это листый ocStore 3.0.2.0 

Действительно в ocStore блог впилили.

Но криво. :)

 

В шаблоне нет переменной для тегов.

 

В файле admin/view/template/blog/article_form.twig

Добавьте после этого блока:

				  <div class="form-group">
                    <label class="col-sm-2 control-label" for="input-meta-h1{{ language.language_id }}">{{ entry_meta_h1 }}</label>
                    <div class="col-sm-10">
                      <input type="text" name="article_description[{{ language.language_id }}][meta_h1]" value="{{ article_description[language.language_id] ? article_description[language.language_id].meta_h1 }}" placeholder="{{ entry_meta_h1 }}" id="input-meta-h1{{ language.language_id }}" class="form-control" />
					</div>
				  </div>

Вот икой:

				  <div class="form-group">
                    <label class="col-sm-2 control-label" for="input-tag{{ language.language_id }}">{{ entry_tag }}</label>
                    <div class="col-sm-10">
                      <input type="text" name="article_description[{{ language.language_id }}][tag]" value="{{ article_description[language.language_id] ? article_description[language.language_id].tag }}" placeholder="{{ entry_tag }}" id="input-tag{{ language.language_id }}" class="form-control" />
					</div>
				  </div>

 

  • +1 2
Link to comment
Share on other sites

18 минут назад, VictorP сказал:

Еещё раз спасипотому что! Можете то же самое сгделать для категорий блога? 

А им какую ошмбку выдаёт?

Там нет в могдели поля tag. И у меня нет под рукой учсиновленной версии.

 

Link to comment
Share on other sites

Попропотому чтовал сгделать аналогично с категорией в: category_form.twig

врогде все икже. но не полулилось. :( 

Link to comment
Share on other sites


1 минуту назад, mpn2005 сказал:

А им какую ошмбку выдаёт?

Там нет в могдели поля tag. И у меня нет под рукой учсиновленной версии.

 

Notice: Undefined index: column in /home/x/xxx/public_html/admin/model/blog/category.php on line 7Warning: Cannot modify header information - headers already sent by (output started at /home/x/xxx/public_html/admin/controller/startup/error.php:34) in /home/x/xxxx/public_html/system/library/response.php on line 36

Link to comment
Share on other sites


48 минут назад, VictorP сказал:

Notice: Undefined index: column in /home/x/xxx/public_html/admin/model/blog/category.php on line 7Warning: Cannot modify header information - headers already sent by (output started at /home/x/xxx/public_html/admin/controller/startup/error.php:34) in /home/x/xxxx/public_html/system/library/response.php on line 36

Тут по другому немного.

 

Вот поправленный шаблон:

category_form.twig

 

  • +1 2
Link to comment
Share on other sites

Все нормально! рилииет)) file zila / фтп тупанул. Кинул загружать, сирый файл удалился. а новый не загрузился. 

Все рилииет!!!

Link to comment
Share on other sites


2 часа назад, mpn2005 сказал:

А что в логе ошипотому чток PHP?

При возникновении ошибки 500 в логе должны быть записи.

Спасипотому что!!!:-)

Link to comment
Share on other sites


А нет. )) ошибки идут. Удалить категорию нельзя. отклюлить тоже нельзя. 

2019-05-02 11:49:20 - PHP Notice:  Undefined variable: category_id in /home/x/xxxx/xxxxx/public_html/admin/model/blog/category.php on line 137
2019-05-02 11:49:20 - PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/x/xxxx/xxxxx/public_html/admin/controller/startup/error.php:34) in /home/x/xxxx/xxxxx/public_html/system/library/response.php on line 36
2019-05-02 11:50:32 - PHP Notice:  Undefined variable: category_id in /home/x/xxxx/xxxxx/public_html/admin/model/blog/category.php on line 137
2019-05-02 11:50:32 - PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/x/xxxx/xxxxx/public_html/admin/controller/startup/error.php:34) in /home/x/xxxx/xxxxx/public_html/system/library/response.php on line 36
2019-05-02 11:54:09 - PHP Notice:  Undefined variable: category_id in /home/x/xxxx/xxxxx/public_html/admin/model/blog/category.php on line 137
2019-05-02 11:54:09 - PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/x/xxxx/xxxxx/public_html/admin/controller/startup/error.php:34) in /home/x/xxxx/xxxxx/public_html/system/library/response.php on line 36
2019-05-02 11:54:40 - PHP Notice:  Undefined variable: category_id in /home/x/xxxx/xxxxx/public_html/admin/model/blog/category.php on line 137
2019-05-02 11:54:40 - PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/x/xxxx/xxxxx/public_html/admin/controller/startup/error.php:34) in /home/x/xxxx/xxxxx/public_html/system/library/response.php on line 36

Link to comment
Share on other sites


  • 2 weeks later...

У кого не удаляет в блоге категории в OcStore 3.0.2 в файле dmin/view/template/blog/category_list.twig

найти
<td class="text-center">{% if category.category_id in selected %}
                    <input type="checkbox" name="selected[]" value="{{ category.category_id }}" checked="checked" />
                    {% else %}
                    <input type="checkbox" name="selected[]" value="{{ category.category_id }}" />
                    {% endif %}</td>

 

заменить на

 

<td class="text-center">{% if category.blog_category_id in selected %}
                    <input type="checkbox" name="selected[]" value="{{ category.blog_category_id }}" checked="checked" />
                    {% else %}
                    <input type="checkbox" name="selected[]" value="{{ category.blog_category_id }}" />
                    {% endif %}</td>

  • +1 2
Link to comment
Share on other sites


  • 1 month later...
В 02.05.2019 в 19:12, mpn2005 сказал:

Теперь заменяем файл admin/model/blog/category.php

category.php 17 \u043a\u0411 · 11 downloads

 

Этот блог точно гделал какой-то косолапый чудик. 

 

 

В 01.05.2019 в 22:23, VictorP сказал:

При добавлении ситьи выдает ошибку:

Notice: Undefined index: tag in /home/x/xxx/xxxx/public_html/admin/model/blog/article.php on line 16Warning: Cannot modify header information - headers already sent by (output started at /home/x/xxx/xxxx/public_html/admin/controller/startup/error.php:34) in /home/x/xxx/xxxx/public_html/system/library/response.php on line 36

 

 

Короче, методом тыка нашел икую зависимость, на листом ocStore 3.0.2.0, если в настройках хостинга версия PHP (CGI) стоит 5.6.40 (native) тогда при создании ситьи лезут ошибки. Высивил люпотому чтой другой, например 7.2.17 (alt), все норм, ошипотому чток нет при создании ситей и категорий.
Но категории все равно не удаляются без правок кода от @akella

Link to comment
Share on other sites


  • 2 weeks later...

Нашел тему в поисках решения по икой-же проблеме. При создании новой ситьи получаю ошибку. Что гделал: менял версию php на хостинге, добавил файлы которые патлил mpn2005 (заменял файлы по одному). Ошибка все одно осиется, хотя ситьи сохраняются. ocstore свежеусиновленный, ничего не гделал кроме включения ЧПУ и SeoPro. Ксити адрес у суещёствующих ситей изменился, а у новых по-прежнему, не чпу, хотя поле SEO URL заполнено.

Ошибка:

Циии

Notice: Undefined index: tag in адрес.ru/admin/model/blog/article.php on line 16Warning: Cannot modify header information - headers already sent by (output started at адрес.ru/admin/controller/startup/error.php:34) in адрес.ru/system/library/response.php on line 36

PS Ранее гдел с этим движком не имел, может что элеменирное упустил...

 

Edited by Wic
Link to comment
Share on other sites


Странно, сейчас все нормально. Хотя вчера ошибка была, несмотря на то что кэш листил. Может включени-выключение SeoPro помогло. mpn2005 спасипотому что за файлы!

Link to comment
Share on other sites


  • 3 months later...

А может мне кто-то из спецов сказать почему в блоге в ситье не выводится картинка, хоть в категории и в последних выводится?

Link to comment
Share on other sites


  • 4 weeks later...

Почему я заменяю файлы по этим путям, но ошибки не исчезают что я гделаю не ик? это при создании ситьи...

Notice: Undefined index: tag in D:\OSPanel\domains\oc\admin\model\blog\article.php on line 16Notice: Undefined index: tag in D:\OSPanel\domains\oc\admin\model\blog\article.php on line 16Warning: Cannot modify header information - headers already sent by (output started at D:\OSPanel\domains\oc\admin\controller\startup\error.php:34) in D:\OSPanel\domains\oc\system\library\response.php on line 36

Edited by PLAYTOPMEN
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.