Skip to content
New issue

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

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

Already on GitHub? # to your account

fixup! Return attributes node even when none is provided for custom tags #65

Closed
wants to merge 1 commit into from

Conversation

fsoedjede
Copy link

@fsoedjede fsoedjede commented Jan 20, 2023

Question Answer
JIRA issue IBX-XXXXX
Bug/Improvement yes
New feature no
Target version 4.3
BC breaks no
Tests pass yes/no
Doc needed yes/no

With the following configuration

ibexa:
    system:
        default:
            fieldtypes:
                ezrichtext:
                    custom_tags: [mytag]
ibexa_fieldtype_richtext:
     custom_tags:
        mytag:
            template: field_type/ibexa_fieldtype_richtext/custom_tags/mytag.html.twig
            icon: '/assets/field_type/ibexa_fieldtype_richtext/custom_tags/icon/mytag.svg'```

I have an error in JS because no attribute is defined.

The error occures at least at two places:

It's because this.config.attributes is undefined.

This change allows us to make sure that this.config.attributes is always defined.

see: #42 (comment)

TODO:

  • Fix a bug.
  • Implement tests.
  • Fix new code according to Coding Standards ($ composer fix-cs).
  • Ask for Code Review.

@fsoedjede fsoedjede changed the base branch from main to 4.3 January 20, 2023 14:35
@fsoedjede fsoedjede changed the base branch from 4.3 to main January 20, 2023 14:36
@fsoedjede fsoedjede force-pushed the fix-custom-attributes branch from 30c7cb0 to 2677ac8 Compare January 20, 2023 14:43
@fsoedjede fsoedjede changed the base branch from main to 4.3 January 20, 2023 14:43
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@dew326
Copy link
Contributor

dew326 commented May 18, 2023

Hi @fsoedjede, the issue should be fixed in #82

@fsoedjede
Copy link
Author

I'm closing this PR then.
I'm not working anymore on the projects in order to test.
Thanks

@fsoedjede fsoedjede closed this May 19, 2023
@fsoedjede fsoedjede deleted the fix-custom-attributes branch May 19, 2023 09:39
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants