0

I'm building a custom module which needs a grid and edit form for my model. I managed to build the grid from a tutorial and my edit controller works as well. However, there is no content being rendered and I get this error:

[2017-05-30 10:48:12] main.INFO: Cache file with merged layout: LAYOUT_adminhtml_STORE1_395a947ddb2d131e0726ca40a8f539941 and handles default, slideshow_slide_edit: Please correct the XML data and try again. [] []

my layout slideshow_slide_edit.xml:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="left">
        <block class="Myvendor\Slideshow\Block\Adminhtml\Slide\Edit\Tabs"
            name="myvendor_slideshow_slide.edit.tabs"/>
    </referenceBlock>
    <referenceBlock name="content">
        <block class="Myvendor\Slideshow\Block\Adminhtml\Slide\Edit" name="myvendor_slideshow_slide.edit"/>
    </referenceBlock>
</body>

The Slide/Edit Block is obviously constructed as some additional buttons appear, and with some die-debugging I was able to confirm the Slide/Edit/Tabs Block is constructed as well, but neither of them have any content. I am not even sure where to look for my mistake.

1 Answer 1

1

you are missing a the closing </page> tag. probably that caused your XML File to be incorrect, the rest looks fine to me.

also you should change xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd" to xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" this is not neccessary but it's recommended to use the relative path

1
  • Thanks. Unfortunately, the </page> tag was merely lost in copy paste, it is present in the file. I changed the schema location, but as you expected that makes no difference. I begin to suspect the layoutfile might not be the problem since the constructors of both blocks do get called after all. Commented Jun 6, 2017 at 8:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.