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

block-plus-minus plugin: field named "TEXT" not found in "text_join" block #1134

Closed
johnnyoshika opened this issue May 7, 2022 · 5 comments · Fixed by google/blockly#7598 or #2025
Closed
Labels
category: plugin Anything in the plugins folder type: bug Something isn't working

Comments

@johnnyoshika
Copy link
Contributor

Category

  • Plugins

Component

block-plus-minus

Describe the bug

block-plus-minus plugin, when used with Blockly 8.0.1 and the text_join block results in this warning in the console:

field named "TEXT" not found in "text_join" block (id="|rQF{.!!]-+H=?7ai!O0")

The warning seems to be coming from here:
https://github.com/google/blockly/blob/master/blocks/text.js#L682

To Reproduce

  1. Install @blockly/block-plus-minus

  2. Import @blockly/block-plus-minus

import '@blockly/block-plus-minus';
  1. Add text_join block to toolbox:
        {
          kind: 'block',
          type: 'text_join',
        },

Now load Blockly and drag the text_join block into the workspace.

Expected behavior

No warning should appear.

Screenshots

image

Additional context

@johnnyoshika johnnyoshika added triage type: bug Something isn't working labels May 7, 2022
@johnnyoshika
Copy link
Contributor Author

I forgot to list the versions of packages I'm using:

  "dependencies": {
    "@blockly/block-plus-minus": "^3.0.13",
    "@testing-library/jest-dom": "^5.16.4",
    "@testing-library/react": "^13.1.1",
    "@testing-library/user-event": "^13.5.0",
    "@types/jest": "^27.4.1",
    "@types/node": "^16.11.31",
    "@types/react": "^18.0.8",
    "@types/react-dom": "^18.0.0",
    "blockly": "^8.0.1",
    "react": "^18.1.0",
    "react-dom": "^18.1.0",
    "react-scripts": "^4.0.3",
    "typescript": "^4.6.4",
    "web-vitals": "^2.1.4"
  },

@BeksOmega
Copy link
Contributor

Thank you for reporting this :D Can reproduce! This doesn't seem to be JSON specific, but happens whenever the block is deserialized (from XML or JSON).

@BeksOmega BeksOmega added category: plugin Anything in the plugins folder and removed triage labels May 9, 2022
@johnnyoshika
Copy link
Contributor Author

@BeksOmega Given that this is only a warning, is it safe to deploy this to a live production environment?

@BeksOmega
Copy link
Contributor

@johnnyoshika yeah it should be fine =)

The issue is that in core, we mix the quoting functionality directly into the text_create_with block, while in the plus/minus plugin we apply the extension. This means that on the plus/minus block we trigger quoting, but in core we do not.

If you look at the quoteField_ definition, it doesn't do anything unless it actually finds a matching field. So the warning just means "hey I didn't do anything".

So I think it should be fine to put in production, but definitely double check my logic for yourself =)

@johnnyoshika
Copy link
Contributor Author

@BeksOmega Awesome, thanks so much for your input!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: plugin Anything in the plugins folder type: bug Something isn't working
Projects
None yet
2 participants