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

Is "sourcemodel eav/entity_attribute_source_boolean not allowed for frontend input type: boolean" a valid EAV model check issue? #50

Open
loekvangool opened this issue Jun 4, 2021 · 1 comment

Comments

@loekvangool
Copy link

I'm hit with this error:

sourcemodel eav/entity_attribute_source_boolean not allowed for frontend input type: boolean - the frontend input type should be select

Triggered by:

if ($sourceModel != '' && ! in_array($attribute->getFrontendInput(), $sourceModelsAllowed)) {
    $additionalMessage = null;
    if($attribute->getSourceModel() == 'eav/entity_attribute_source_boolean' && $attribute->getFrontendInput() != 'select') {
        $additionalMessage = ' - the frontend input type should be select';
    }
    $error .= '<error>sourcemodel ' . $attribute->getSourceModel() . ' not allowed for frontend input type: ' . $attribute->getFrontendInput() . $additionalMessage . '</error>';
}

However, this error applies to any boolean attribute created by vanilla Magento 1.9 / OpenMage 19. Also it seems to functionally work fine. Are we sure this is an actual problem?

@sprankhub
Copy link
Member

Hmm good question. On a rather clean instance, I see one attribute with a boolean frontend input:

mysql> SELECT * FROM eav_attribute WHERE frontend_input = 'boolean';
+--------------+----------------+---------------------------+-----------------+-----------------------------------------+--------------+---------------+----------------+----------------+------------------------------------------------+----------------+--------------+-------------+-----------------+---------------+-----------+------+
| attribute_id | entity_type_id | attribute_code            | attribute_model | backend_model                           | backend_type | backend_table | frontend_model | frontend_input | frontend_label                                 | frontend_class | source_model | is_required | is_user_defined | default_value | is_unique | note |
+--------------+----------------+---------------------------+-----------------+-----------------------------------------+--------------+---------------+----------------+----------------+------------------------------------------------+----------------+--------------+-------------+-----------------+---------------+-----------+------+
|           35 |              1 | disable_auto_group_change | NULL            | customer/attribute_backend_data_boolean | static       | NULL          | NULL           | boolean        | Disable Automatic Group Change Based on VAT ID | NULL           | NULL         |           0 |               0 | NULL          |         0 | NULL |
+--------------+----------------+---------------------------+-----------------+-----------------------------------------+--------------+---------------+----------------+----------------+------------------------------------------------+----------------+--------------+-------------+-----------------+---------------+-----------+------+
1 row in set (0,00 sec)

So boolean seems to be fine as well. @peterjaap, any thoughts (since you added that specific message)?

@loekvangool loekvangool changed the title Is `sourcemodel eav/entity_attribute_source_boolean not allowed for frontend input type: boolean a valid EAV model check issue? Is "sourcemodel eav/entity_attribute_source_boolean not allowed for frontend input type: boolean" a valid EAV model check issue? Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants