This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Zaq
Zaq

Hi

After installing the RainLab.Translate plugin medialibrary with maxItems:0 field in static pages plugin stop working, the data has been saved differently:
Before update:

sections[5][documents][0][files][] = "/URSO/Bratislava.pdf"
sections[5][documents][0][files][] = "/URSO/Zilina.pdf"
sections[5][documents][0][files][] = "/URSO/Martin.pdf"
sections[5][documents][0][files][] = "/URSO/Zvolen.pdf"
sections[5][documents][0][files][] = "/URSO/Kosice.pdf"

After update:

sections[5][documents][0][files] = "["/URSO/Bratislava.pdf", "/URSO/Zilina.pdf", "/URSO/Martin.pdf","/URSO/Zvolen.pdf","/URSO/Kosice.pdf"]"

So now It is cast as string, not as array so the twig for loop doesnt work anymore, also when I refresh page medialibrary is empty.
Please help ;)

Last updated

daftspunky
daftspunky

Hi Zaq,

It seems to be working fine here.

imagesmulti[] = "/mr-robot.gif"
imagesmulti[] = "/company-founder.png"
imagessingle = "/about-team.png"

Some things to try:

  1. Using latest version of all plugins
  2. Email support: https://octobercms.com/contact

Make sure you include all information about your system including the layout content and if you have the RainLab.Translate plugin installed and how many languages you have configured (these are all factors that change the outcome).

Best regards

Zaq
Zaq

Thanks for your reply.
Maybe this information could solve the problem:

Page layout file:

description = "Šablóna pre stránky"
[session]

[staticPage]
useContent = 1
default = 0
==
<?php

function onEnd()
{
    $this['path_css'] = mix('dist/app.css', 'themes/mai/assets');
    $this['path_js'] = mix('dist/app.js', 'themes/mai/assets');
    $this['path_manifest_js'] = mix('dist/manifest.js', 'themes/mai/assets');
    $this['path_vendor_js'] = mix('dist/vendor.js', 'themes/mai/assets');
}
?>
==
{variable name="image" label="OG Image obrázok" tab="cms::lang.editor.meta" placement="primary" type="mediafinder" mode="image"}{/variable}
{variable name="sections" type="repeater" prompt="Pridať sekciu" tab="Sekcie" placement="secondary" groups="$/zea/gjk/config/repeater.yaml"}{/variable}
<!DOCTYPE html>
<html>
    <head>
        {% partial 'common/head' %}
    </head>
    <body class="{{ this.page.id }}">

        <!-- Header -->
        {% partial 'common/header' %}

        <!-- Content -->
        {% for section in sections %}
            {% partial 'sections/'~section._group data=section %}
        {% endfor %}

        <!-- Footer -->
        {% partial 'common/footer' %}

        <!-- Scripts -->
        <script src="{{ path_manifest_js }}"></script>
        <script src="{{ path_vendor_js }}"></script>
        <script src="{{ path_js }}"></script>
        {% scripts %}
    </body>
</html>

Problematic field in repeater.yaml:

document_section:
    name: Sekcia s dokumentmi 
    description: Sekcia s dokumentmi 
    icon: icon-file-o
    fields:
        heading:
            label: Nadpis
            type: text
            span: left
        text:
            span: right
            label: Details
            type: richeditor
        documents:
            label: Dokumenty
            prompt: 'Pridať dokument'
            style: default
            span: full
            type: repeater
            form:
                fields:
                    name:
                        label: Názov
                        span: left
                        type: text
                    description:
                        label: Popis
                        span: right
                        type: richeditor
                    files:
                        label: Dokumenty
                        span: full
                        mode: file
                        maxItems: 0
                        type: mediafinder

I am using the RainLab.Translate plugin, but its not configured yet -> only english language is set up with no translations.

Zaq
Zaq

When I disable the RainLab.Translate plugin its working back -> so the problem was not upgrade, the problem was instaling the RainLab.Translate plugin.

1-4 of 4

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.