October: theme.yaml stops working with a large content

Created on 9 Oct 2016  ·  6Comments  ·  Source: octobercms/october

Expected behavior

Adding content to the repeater field

Actual behavior

it does not

Reproduce steps

theme.yaml contains repeater field, when a lot of content - new is not added, there is no error

October build

latest

Russian: спасибо за все что вы делаете, OctoberCMS это лучшее что я видел в мире PHP и я желаю вам скорейшего процветания. При использовании в продакшене всплыла досадность что если добавить поля в theme.yaml и наполнять их контентом то при большом количестве этого контента он просто не добавляется, т.е. при нажатии на "добавить" спиннер крутится и больше ничего не происходит. Эта проблема наблюдается на разных проектах. Если у вас есть идеи, пожалуйста, подскажите что сделать чтобы исправить эту проблему.

Medium Review Needed Unconfirmed Bug

All 6 comments

Can you provide the exact field definition you are using? Or even the full theme.yaml file contents?

Full .yaml file: https://yadi.sk/d/HsQ8Zr3Bwo6ek

what I mean by a problem:
help

I added a new field to yaml on the site with this problem and the part of the added content ceased to be displayed, it is a real problem.

Contents

name:        'web2easy'
description: 'Aлексей Литовченко | портфолио вебмастера'
author:      'Alexey Litovchenko'
homepage:    'https://web2easy.ru'
code:        ''
#require:
#    - Acme.User
#    - Acme.Blog
form:
    fields:


        #Основные поля

        developer:
            label:   Разработчик
            type:    text
            comment: Люди и компании, учавствовавшие в разработке темы
            default: web2easy.ru

        site_name:
            label:   Имя сайта
            type:    text
            comment: Используется для заголовков форм и в других блоках темы
            default: 'Новый сайт'

        site_color:
            label:   Акцентированный цвет мобильного приложения
            type:    colorpicker

    tabs:
        fields:


            #Сторонние скрипты и метатеги

            seo_header:
                label:   Сторонние скрипты и метатеги
                type:    section
                comment: Здесь можно подключить скрипты и метатеги сторонних сервисов, например API социальных сетей, метрики, онлайн-консультанты и т.д.
                tab:     SEO

            seo_head:
                label:    Метатеги и скрипты, подключаемые в шапке сайта
                type:     codeeditor
                language: html
                size:     huge
                span:     left
                comment:  Например код верификации Яндекс.Вебмастер
                tab:      SEO

            seo_scripts:
                label:    Скрипты, подключаемые после шаблона
                type:     codeeditor
                language: html
                size:     huge
                span:     right
                comment:  Например код Яндекс.Метрики, онлайн-консультант JivoSite
                tab:      SEO


            #Профессиональные навыки

            professional_skills_header:
                label:   Разработка
                type:    section
                comment: Добавление первичных навыков
                tab:     Профессиональные навыки

            professional_skills_item:
                type:   repeater
                prompt: Добавить навык
                form:
                    fields:
                        professional_skills_name:
                            label: Навык
                            type:  text
                            span:  left
                        professional_skills_subname:
                            label: Инструменты
                            type:  text
                            span:  right
                        professional_skills_persent:
                            label: Процентаж навыка
                            type: number
                tab: Профессиональные навыки

            professional_skills_header_secondary:
                label:   Дополнительные навыки

                type:    section
                comment: Добавление дополнительных навыков
                tab:     Профессиональные навыки

            professional_skills_item_secondary:
                type:   repeater
                prompt: Добавить навык
                form:
                    fields:
                        professional_skills_name_secondary:
                            label: Навык
                            type:  text
                            span:  left
                        professional_skills_subname_secondary:
                            label: Инструменты
                            type:  text
                            span:  right
                        professional_skills_persent_secondary:
                            label: Процентаж навыка
                            type:  number
                tab: Профессиональные навыки


            #Опыт работы

            experience_header:
                label:   Опыт работы
                type:    section
                comment: Добавление опыта работы
                tab:     Опыт работы

            experience_item:
                type:   repeater
                prompt: Добавить рабочее место
                form:
                    fields:
                        experience_name:
                            label: Должность
                            type:  text
                            span:  left
                        experience_vendor:
                            label: Компания
                            type:  text
                            span:  right
                        experience_time:
                            label: Время работы
                            type:  text
                        experience_description:
                            label: Описание
                            type:  richeditor
                tab: Опыт работы


            #Образование и сертификаты

            education_header:
                label:   Опыт работы
                type:    section
                comment: Добавление опыта работы
                tab:     Образование и сертификаты

            education_item:
                type:   repeater
                prompt: Добавить документ
                form:
                    fields:
                        education_name:
                            label: Название курса
                            type:  text
                            span:  left
                        educatione_vendor:
                            label: Компания, выдавшая документ
                            type:  text
                            span:  right
                        education_time:
                            label: Год получения
                            type:  text
                        education_title:
                            label: Заголовок
                            type:  text
                            span:  left
                        education_description:
                            label: Текст
                            type:  richeditor
                            span:  right
                tab: Образование и сертификаты


            #Портфолио

            portfolio_header:
                label:   Портфолио
                type:    section
                comment: Добавление работ в портфолио
                tab:     Портфолио

            portfolio_item:
                type:   repeater
                prompt: Добавить работу
                form:
                    fields:
                        portfolio_image:
                            label: Изображение
                            type:  mediafinder
                            mode:  image
                            span:  left
                        portfolio_type:
                            label: Тип работы
                            type: dropdown
                            span:  right
                            options:
                                markup: Верстка
                                landing: Landing Page
                                site: Сайт-визитка
                                corporate: Корпоративный сайт
                                catalogue: Сайт-каталог
                                other: Прочее
                        portfolio_name:
                            label: Название
                            type:  text
                            span:  right
                        portfolio_description:
                            label: Описание
                            type:  text
                            span:  right
                        portfolio_link:
                            label: Ссылка
                            type:  text
                            span:  right
                        portfolio_favorite:
                            label: Избранная работа
                            type: switch
                            comment:
                            span:  right
                tab: Портфолио


           #Отзывы

            reviews_header:
                label:   Отзывы
                type:    section
                comment: Добавление отзывов
                tab:     Отзывы

            reviews_item:
                type:   repeater
                prompt: Добавить отзыв
                form:
                    fields:
                        reviews_image:
                            label: Фото
                            type:  mediafinder
                            mode:  image
                            span:  left
                        reviews_vk:
                            label: Ссылка на Вконтакте
                            type:  text
                            span:  right
                        reviews_od:
                            label: Ссылка на Facebook
                            type:  text
                            span:  right
                        reviews_fb:
                            label: Ссылка на Одноклассники
                            type:  text
                            span:  right
                        reviews_title:
                            label: Имя человека или компании, оставившей отзыв
                            type:  text
                        reviews_site:
                            label: Ссылка на сайт
                            type:  text
                        reviews_pdf:
                            label: PDF
                            type: mediafinder
                            mode: file
                        reviews_content:
                            label: Текст отзыва
                            type:  richeditor
                            size:  huge
                tab: Отзывы

#_____________________________________
# FAQ
#_____________________________________
#
# Ссылки на документацию
#
# Field options
# https://octobercms.com/docs/backend/forms#form-field-options
#
# Field types
# https://octobercms.com/docs/backend/forms#field-types

I had a similar issue with a very large menu configuration in one of my themes. In my case this problem was caused by the PHP variable max_input_vars which is set to 1000 by default. If the POST request had more than 1000 fields, PHP would simply truncate the rest - October didn't even know that there were more fields.
I fixed the problem by setting max_input_vars in my php.ini to 2000. Maybe this can help you, too.

I fixed the problem by setting max_input_vars in my php.ini to 2000

Thanks a lot, it has really helped!

Was this page helpful?
0 / 5 - 0 ratings