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

Invalid content was found starting with element 'depends'. No child element is expected at this point. in widget.xml #31092

Open
5 tasks
DmitryFurs opened this issue Nov 30, 2020 · 10 comments
Labels
Component: Widget Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P3 May be fixed according to the position in the backlog. Progress: ready for dev Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch stale issue Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it

Comments

@DmitryFurs
Copy link
Contributor

DmitryFurs commented Nov 30, 2020

Precondition (*)

Magento 2.4-develop

Summary (*)

When we use a custom block to render the input field in the widget, when placing any node after the <block, it is highlighted with error: Invalid content was found starting with element 'depends'. No child element is expected at this point.

If we change the order so that the <block is the last one, there are no errors

There is also a strange behavior when using the standard type for the input field (for example text) and use the dependency, if the dependencies are not described at the end, we get the following error: Invalid content was found starting with element 'description'. One of '{value}' is expected.

Examples (*)

image

<?xml version="1.0" encoding="UTF-8"?>
<widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Widget:etc/widget.xsd">
    <widget id="ecommerce_reviews" class="Ecommerce\ReviewWidget\Block\Widget">
        <label translate="true">Reviews Widget by eCommerce</label>
        <description>This widget allows you to display reviews anywhere on the site</description>
        <parameters>
            <parameter name="is_enabled" xsi:type="select" source_model="Magento\Config\Model\Config\Source\Yesno" visible="true" required="true" sort_order="10">
                <label translate="true">Is Enabled</label>
            </parameter>
            <parameter name="reviews_to_display_1" xsi:type="block" visible="true" required="true" sort_order="20">
                <label translate="true">Reviews to Display</label>
                <block class="Ecommerce\ReviewWidget\Block\Adminhtml\Widget\Parameter\Number" />
                <depends>
                    <parameter name="is_enabled" value="1" />
                </depends>
                <description translate="true">Description</description>
            </parameter>
            <parameter name="reviews_to_display_2" xsi:type="block" visible="true" required="true" sort_order="20">
                <label translate="true">Reviews to Display</label>
                <depends>
                    <parameter name="is_enabled" value="1" />
                </depends>
                <block class="Ecommerce\ReviewWidget\Block\Adminhtml\Widget\Parameter\Number" />
                <description translate="true">Description</description>
            </parameter>
            <parameter name="reviews_to_display_3" xsi:type="block" visible="true" required="true" sort_order="20">
                <label translate="true">Reviews to Display</label>
                <description translate="true">Description</description>
                <depends>
                    <parameter name="is_enabled" value="1" />
                </depends>
                <block class="Ecommerce\ReviewWidget\Block\Adminhtml\Widget\Parameter\Number" />
            </parameter>

            <parameter name="reviews_to_display_4" xsi:type="text" visible="true" required="true" sort_order="20">
                <label translate="true">Reviews to Display</label>
                <depends>
                    <parameter name="is_enabled" value="1" />
                </depends>
                <description translate="true">Description</description>
            </parameter>
            <parameter name="reviews_to_display_5" xsi:type="text" visible="true" required="true" sort_order="20">
                <label translate="true">Reviews to Display</label>
                <description translate="true">Description</description>
                <depends>
                    <parameter name="is_enabled" value="1" />
                </depends>
            </parameter>

            <parameter name="template" xsi:type="select" visible="true" required="true" sort_order="1000">
                <label translate="true">Template</label>
                <options>
                    <option name="default" value="Ecommerce_ReviewWidget::widget/default.phtml" selected="true">
                        <label translate="true">Default Template</label>
                    </option>
                </options>
            </parameter>
        </parameters>
    </widget>
</widgets>

Proposed solution


Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users with no workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
@DmitryFurs DmitryFurs added the Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it label Nov 30, 2020
@m2-assistant
Copy link

m2-assistant bot commented Nov 30, 2020

Hi @DmitryFurs. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@mmezhensky
Copy link
Contributor

@magento I am working on this

@mmezhensky mmezhensky removed their assignment Dec 28, 2020
@engcom-Alfa engcom-Alfa self-assigned this Jan 13, 2021
@m2-assistant
Copy link

m2-assistant bot commented Jan 13, 2021

Hi @engcom-Alfa. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Alfa
Copy link
Contributor

Hi @DmitryFurs .
Unfortunately, we are not able to reproduce the issue on fresh 2.4-develop following by provided scenario.

Actual Result: ✔️ If we change the order so that the <block is in different positions, there are no errors.

Screenshot from 2021-01-15 00-39-24
Screenshot from 2021-01-15 00-38-52

@DmitryFurs Maybe we missed something?
Could you take a look?
Thanks!

@engcom-Alfa engcom-Alfa added the Issue: needs update Additional information is require, waiting for response label Jan 14, 2021
@m2-community-project m2-community-project bot moved this from Ready for Confirmation to Needs Update in Issue Confirmation and Triage Board Jan 14, 2021
@DmitryFurs
Copy link
Contributor Author

@engcom-Alfa you need to enable URN schemes
https://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-urn.html

image

@engcom-Alfa
Copy link
Contributor

@DmitryFurs The issue is reproducible on a fresh 2.4-develop.

2021-01-21_16-21
If we change the order so that the <block is the last one, everything works as expected.
Thanks!

@engcom-Alfa engcom-Alfa removed the Issue: needs update Additional information is require, waiting for response label Jan 22, 2021
@m2-community-project m2-community-project bot moved this from Needs Update to Ready for Confirmation in Issue Confirmation and Triage Board Jan 22, 2021
@engcom-Alfa engcom-Alfa added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Jan 22, 2021
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @engcom-Alfa
Thank you for verifying the issue. Based on the provided information internal tickets MC-40583 were created

Issue Available: @engcom-Alfa, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@m2-community-project m2-community-project bot moved this from Ready for Confirmation to Confirmed in Issue Confirmation and Triage Board Jan 22, 2021
@m2-community-project m2-community-project bot removed the Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed label Jan 22, 2021
@gabrieldagama gabrieldagama added the Priority: P3 May be fixed according to the position in the backlog. label Feb 4, 2021
@m2-community-project m2-community-project bot added this to Ready for Development in Low Priority Backlog Feb 4, 2021
@stale
Copy link

stale bot commented Apr 21, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Is this issue still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? Thank you for your contributions!

@stale stale bot added the stale issue label Apr 21, 2021
@DmitryFurs
Copy link
Contributor Author

The ticket is still relevant.

@stale stale bot removed the stale issue label Apr 22, 2021
@stale
Copy link

stale bot commented Sep 21, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 28 days if no further activity occurs. Is this issue still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? Thank you for your contributions!

@stale stale bot added the stale issue label Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Widget Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P3 May be fixed according to the position in the backlog. Progress: ready for dev Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch stale issue Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Projects
Low Priority Backlog
  
Ready for Development
Development

No branches or pull requests

5 participants