astorm / pestle

A collection of command line scripts for Magento 2 code generation, and a PHP module system for organizing command line scripts.
MIT License
533 stars 101 forks source link

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

Open eralaz opened 6 years ago

eralaz commented 6 years ago

Generates layout like

 <page>
    <referenceBlock>
   ...

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

<page>
  <body>
    <referenceBlock>
...
astorm commented 6 years ago

@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?

eralaz commented 6 years ago

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

eralaz commented 6 years ago

layout broken due to it missed tag within the layout xml file

eralaz commented 6 years ago

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

astorm commented 6 years ago

@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 commented 6 years ago

@larylaz did you solve your problem?

eralaz commented 6 years ago

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.

astorm commented 6 years ago

@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.

eralaz commented 6 years ago

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

astorm commented 6 years ago

@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?

eralaz commented 6 years ago

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

astorm commented 6 years ago

@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.

eralaz commented 6 years ago

Yep! This is a feature request for the command to generate the layout XML files with tags. That's the main point.