Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attribute 'setup_version' is missing for module error when defined as optional #1493

Closed
markshust opened this issue Jul 16, 2015 · 5 comments
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@markshust
Copy link
Contributor

Using the defined module.xml when creating a module:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
    <module name="Foo_Bar" />
</config>

Leads to this error: Attribute 'setup_version' is missing for module

However as defined by lib/internal/Magento/Framework/Module/etc/module.xsd, this is an optional field:
<xs:attribute name="setup_version" type="setupVersion" use="optional" />

@joanhe
Copy link
Contributor

joanhe commented Jul 16, 2015

Thanks for reporting this issue. Internal issue MAGETWO-40320 is created.

@joanhe joanhe added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Jul 16, 2015
@dsikkema-magento
Copy link
Contributor

Hi @markoshust! Again, thanks for the report, we're tracking it. I just wanted to mention how we're planning to fix this: setup_version will become a required attribute, to reflect the fact that it really is required.

dsikkema-magento pushed a commit that referenced this issue Oct 7, 2015
@mazhalai
Copy link
Contributor

@markoshust This issue has been fixed in 2.0.0, hence closing this issue.

magento-team pushed a commit that referenced this issue Sep 14, 2017
[EngCom] Public Pull Requests
 - MAGETWO-75114: Deprecated Magento\Store\Model\Store::$_isAdminSecure #10877
 - MAGETWO-72539: cviking26_issue-9489 // added query param to url build - description … #10848
@carlos-reynosa
Copy link

I'm trying to understand what's going on here. According to this the setup_version was made required but according to the documentation it says its optional:

"The name parameter defines the name of your component. It is required for all components. If you do not use Declarative Schema to help manage the installation and upgrade processes for your component, then you must also add the setup_version parameter to the module line. Set the setup_version value to your module's database schema version. Omit the setup_version parameter if you use [Declarative Schema] "

https://developer.adobe.com/commerce/php/development/build/component-name/

Should it or should it not be added?

@carlos-reynosa
Copy link

And also what would be some possible issues if someone is using declarative scheme but the setup_version was not included? I ask because i feel like i'm getting some data issues and i think it might be related to this. Missing tables and such.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests

6 participants