pestle icon indicating copy to clipboard operation
pestle copied to clipboard

magento2:generate:view generates broken layout (m2.2)

Open eralaz opened this issue 6 years ago • 13 comments

Generates layout like

 <page>
    <referenceBlock>
   ...

when from m2.2

should be between them, like this
<page>
  <body>
    <referenceBlock>
...

eralaz avatar Jun 20 '18 12:06 eralaz

@larylaz Thank you for the feedback. However, it's not clear to me what you're saying. Your post looks like this to me

Generates layout like


...

when from m2.2 should be between them, like this
... 

I'm not sure what the ellipses represent. Coud you try describing your problem in a different way so we can understand what you mean?

astorm avatar Jun 20 '18 13:06 astorm

Hi) briefly the issue is magento2:generate:view generates broken layout

eralaz avatar Jun 21 '18 15:06 eralaz

layout broken due to it missed

tag within the layout xml file

eralaz avatar Jun 21 '18 15:06 eralaz

I see, the snippet has been masked. So, you've got part of the description.

eralaz avatar Jun 21 '18 15:06 eralaz

@larylaz GitHub lets you post code samples by indenting this by four characters. If you can include the problematic output we can take a look at the problem.

Also -- can you tell me what "broken" means? Does it cause an error? Just not render? What's the error? Hoe does it render incorrectly? What version of Magento, etc.

We'd love to help, but without this information we're not sure what to do.

astorm avatar Jun 22 '18 03:06 astorm

@larylaz did you solve your problem?

astorm avatar Jun 23 '18 02:06 astorm

yep, just manually fix the storefront page generated layout. And I'm on Magento version of 2.2.2. It seems like 2.1 had a bid different page layout structure.

eralaz avatar Jun 29 '18 09:06 eralaz

@larylaz I was able to edit your oiginal comment to get at the actual problem you were having. What command did you run to create a layout where the lack of a <body/> makes Magento 2 freak out? Our tests didn't show this happening. We're not doubting you, but without further details we don't know what to fix for you.

astorm avatar Jun 29 '18 13:06 astorm

the command I was used was "pestle magento2:generate:view"

eralaz avatar Jun 29 '18 14:06 eralaz

@larylaz with what sort of arguments (you can substitute different strings if the names are sensitive). What sort of errors did the generated file produce?

astorm avatar Jun 30 '18 03:06 astorm

there were no args pure command and there were no errors on the cli screen.

eralaz avatar Jun 30 '18 12:06 eralaz

@larylaz It's not clear what you mean by a "pure command".

When you run that command pestle asks you for arguments

$ pestle_dev magento2:generate:view
Which Module? (Pulsestorm_HelloGenerate)] 
Which Area? (frontend)] 
Which Handle? (pulsestorm_hellogenerate_index_index)] 
Block Name? (Main)] 
Template File? (content.phtml)] 

What values did you use for those arguments?

Also

no errors on the cli screen

We understand that there were no errors in the command line screen. However, you presumably opened this bug because the layout created errors when you tried to use it in your Magento system. What error was that?

Or were there no errors in Magento, and this is a feature request for the command to generate the layout XML files with <body/> tags?

Answers to these questions will help us ensure we're adding both the features you need, as well as the feature other pestle developers will need.

astorm avatar Jun 30 '18 16:06 astorm

Yep! This is a feature request for the command to generate the layout XML files with

tags. That's the main point.

eralaz avatar Jun 30 '18 20:06 eralaz