Giter Club home page Giter Club logo

Comments (17)

IchHabRecht avatar IchHabRecht commented on May 26, 2024

Can you please attach your mask.json file and tell which version of mask you are using. Thank you!

from mask_export.

lisardo2 avatar lisardo2 commented on May 26, 2024

Of course ... :-)

json:
{
"tt_content": {
"elements": {
"name": {
"label": "Name",
"key": "name",
"shortLabel": "name",
"description": "Irgend ein Name. ",
"icon": "fa-star",
"color": "#b36b09",
"columns": [
"header",
"bodytext",
"image"
],
"labels": [
"My Header",
"My Bodytext",
"My Image"
],
"options": {
"1": "rte"
}
}
}
}
}

i use the last version of mask from TER 2.1.1.

Thanks!

from mask_export.

IchHabRecht avatar IchHabRecht commented on May 26, 2024

Would you mind to checkout the branch https://github.com/CPS-IT/TYPO3-mask_export/tree/restore-file-generation and re-try

from mask_export.

lisardo2 avatar lisardo2 commented on May 26, 2024

This fixes the problem! Now I can export the extension. Only one minor problem remains: after installing the exported extension all content elements in the common tab are gone and only the new CE is present. It seems more or less a problem of the bootstrap package ... Benny rewrote the whole wizard and added all content elements in the end with show = * ... i presume this syntax is not campatible with your "show := addToList(myNewElement)". When i delete the line show := addToList(myNewElement) all works as expected.

Thanks!
GREAT WORK!!!
Peter

from mask_export.

IchHabRecht avatar IchHabRecht commented on May 26, 2024

Hi Peter,

Can you check the order of the extensions in your PackageStates.php? Maybe the bootstrap_package overrides the wizard items. In my example installtion bootstrap_package is loaded before the mask export.

from mask_export.

IchHabRecht avatar IchHabRecht commented on May 26, 2024

Reopened to get feedback

from mask_export.

lisardo2 avatar lisardo2 commented on May 26, 2024

Hi Nicole,

in my installation too:

        'bootstrap_package' => [
            'composerName' => 'bootstrap_package',
            'state' => 'active',
            'packagePath' => 'typo3conf/ext/bootstrap_package/',
            'suggestions' => [],
        ],
        'introduction' => [
            'composerName' => 'introduction',
            'state' => 'active',
            'packagePath' => 'typo3conf/ext/introduction/',
            'suggestions' => [],
        ],
        'mask_example' => [
            'composerName' => 'mask_example',
            'state' => 'active',
            'packagePath' => 'typo3conf/ext/mask_example/',
            'suggestions' => [],
        ],

If i force the the order the other way round (fürst mask_example) and then bootstrap_package it works.

the bootstrap package includes its content elements with: show = *
if show := addToList(name) follows after show = * then only name remains. The other way round:

    show := addToList(name)
    show = *

will work. There is a kind of logic behind it ... the method addToList cannot add himself to * ...

This code in class TypoScriptParser: `

           case 'addToList':
                $newValue = ((string)$currentValue !== '' ? $currentValue . ',' : '') . $modifierArgument;
                break;

ends in $newValue = '*,name'
which is likely not interpreted as "all" anymore.

from mask_export.

lisardo2 avatar lisardo2 commented on May 26, 2024

Well, i found this piece of code in class NewContentElementController:

                foreach ($wizards as $groupKey => $wizardGroup) {
                    $groupKey = rtrim($groupKey, '.');
                    $showItems = GeneralUtility::trimExplode(',', $wizardGroup['show'], true);
                    $showAll = $wizardGroup['show'] === '*';
                    $groupItems = array();
                    if (is_array($appendWizards[$groupKey . '.']['elements.'])) {
                        $wizardElements = array_merge((array)$wizardGroup['elements.'], $appendWizards[$groupKey . '.']['elements.']);
                    } else {
                        $wizardElements = $wizardGroup['elements.'];
                    }

This line ist responsible:
$showAll = $wizardGroup['show'] === '*';

from mask_export.

IchHabRecht avatar IchHabRecht commented on May 26, 2024

But this code is taken from mask extension, isn't it? This has nothing to do with the export then.

from mask_export.

IchHabRecht avatar IchHabRecht commented on May 26, 2024

Are you using mask and your export extension in the same installation?

from mask_export.

lisardo2 avatar lisardo2 commented on May 26, 2024

No, these are core classes - in the end it is a problem of the core, the typoscript renderer. if you put together "*,ce1,ce2" only ce1 and ce2 remains because this term fails: $showAll = $wizardGroup['show'] === '*';
bootstrap_package uses "*" and you use "ce1,ce1". Depending on the order of the extensions you end with: "*" (bootstrap_package loaded after the mask_export) or "*,ce1" (bootstrap before mask_export). The second will fail: all CEs from bootstrap_package are lost.

from mask_export.

IchHabRecht avatar IchHabRecht commented on May 26, 2024

This is really strange as in my setup with bootstrap_package everythink works fine. Can you just give me the version of bootstrap_package and your TYPO3 version again? Is there any other extension dealing with the new content element wizard?

from mask_export.

lisardo2 avatar lisardo2 commented on May 26, 2024

TYPO3 7.6.9
introduction 2.3.0
bootstrap_package 7.0.2
mask_export 0.3.0 (from GIT)
mask 2.1.1 (from TER)
mask_example 0.1.0
thats it - no further extension except the necessary extensions from core.
Standard Installation of introduction package without any alterings.

from mask_export.

IchHabRecht avatar IchHabRecht commented on May 26, 2024

With a fresh installation and your extension information, I'm able to reproduce the problem now. Will have a look what happens here.

from mask_export.

IchHabRecht avatar IchHabRecht commented on May 26, 2024

Problem should be solved by the core with bugfix https://forge.typo3.org/issues/77877 Please consider to test and vote this patch.

from mask_export.

lisardo2 avatar lisardo2 commented on May 26, 2024

I tested the patch in TYPO3 7.6.9 in my test installation. It works as expected: independent from the installation order of mask_example and bootstrap_package all CEs are preserved. I looked in the code itself too and it looks straight forward for me. Well, it seems to be a pretty easy patch. So I voted for it.

from mask_export.

IchHabRecht avatar IchHabRecht commented on May 26, 2024

Thanks for testing and voting. I'm closing this issue now as the mask_export issue is solved.

from mask_export.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.