Custom blocks have warnings "Ignoring non-existent field ..... in block factory_base"

950 views
Skip to first unread message

Paul Hemans

unread,
May 3, 2017, 8:34:43 PM5/3/17
to Blockly
I have designed a number of custom blocks using the developer tools.
I then exported the blocks and the toolbox, and embedded them in a page as nlSqlToolbox and nlSqlBlocks. 
The toolbox loads and predefined Blockly Logic blocks load but none of my custom blocks do. There are no errors in loading the page apart from 71 warnings about "Ignoring non-existent field ..... in block factory_base" 

A snapshot of the warnings:
Ignoring non-existent field CONNECTIONS in block factory_base
Blockly.Xml.domToBlockHeadless_ @ blockly_compressed.js:1091
blockly_compressed.js:1092 Ignoring non-existent input TOOLTIP in block factory_base
Blockly.Xml.domToBlockHeadless_ @ blockly_compressed.js:1092
blockly_compressed.js:1092 Ignoring non-existent input HELPURL in block factory_base
Blockly.Xml.domToBlockHeadless_ @ blockly_compressed.js:1092
blockly_compressed.js:1092 Ignoring non-existent input COLOUR in block factory_base
Blockly.Xml.domToBlockHeadless_ @ blockly_compressed.js:1092
blockly_compressed.js:1091 Ignoring non-existent field NAME in block factory_base

The head section of the page looks like this;
<script src="../js/blockly_compressed.js"></script>
<script src="../js/blocks_compressed.js"></script>
<script src="../js/javascript_compressed.js"></script>
<script src="../js/messages.js"></script>
<script src="../js/en.js"></script>

Blockly is initialized below


var toolbox = document.getElementById("nlSqlToolbox");

var options = {
toolbox: toolbox,
collapse: true,
comments: true,
disable: true,
maxBlocks: Infinity,
trashcan: true,
horizontalLayout: false,
toolboxPosition: 'start',
css: true,
media: '../media/',
rtl: false,
scrollbars: true,
sounds: true,
oneBasedIndex: true
};

var workspace = Blockly.inject('blocklyDiv', options);

var workspaceBlocks = document.getElementById("nlSqlBlocks");

// Load blocks to workspace.
Blockly.Xml.domToWorkspace(workspaceBlocks, workspace);

Any help on what I am doing wrong would be appreciated.

Roukaya Saied

unread,
May 4, 2017, 2:45:55 PM5/4/17
to Blockly
I have the same problem! 
I would like that you publish the solution if you found it, thanks.

Andrew n marshall

unread,
May 4, 2017, 5:14:53 PM5/4/17
to blo...@googlegroups.com
Looking at the field names in the errors and the reference to "factory_base", I believe you have confused the "Download Library" button (top right of the "Block Factory" tab) with the intended "Export" button on the "Workspace Factory" tab. The former saves the library of blocks used to edit the block definitions[1], while the latter is the save XML for your custom blocks as they are placed in the toolbox or workspace.

It's not clear which of your two XML spans are incorrect, and where you are expecting to find your custom blocks. You'll want to check both of them.  I recommend starting with the toolbox, making sure it loads without error, before adding the domToWorkspace(..) call.



"Blocks are saved to the browser's local storage. Clearing the browser's local storage will delete your blocks. To save your blocks indefinitely, you must download your library. Your Block Library is downloaded as an XML file that can be imported to set your Block Library to the state it was when you downloaded the file. Note that importing a Block Library replaces your current one, so you might want to export first.
The import and export features are also the recommended way to maintain and share different sets of custom blocks."

On Thu, May 4, 2017 at 11:45 AM, Roukaya Saied <saied....@gmail.com> wrote:
I have the same problem! 
I would like that you publish the solution if you found it, thanks.

--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Paul Hemans

unread,
May 4, 2017, 7:27:10 PM5/4/17
to Blockly
Andrew thanks for the response. Your right I was confusing the library with the workspace.

Khushbu Yeole

unread,
Mar 12, 2018, 4:45:10 AM3/12/18
to Blockly

HI,
I getting error on console "Uncaught ReferenceError: ng is not defined at scripts.bundle.js:1641"
Not able to find reason why its happening.
Any idea ??

Erik Pasternak

unread,
Mar 12, 2018, 2:12:39 PM3/12/18
to Blockly
Hi Khushbu,

That's not related to this thread. Could you please start a new thread and include what you're doing to generate that error?

Cheers,
Erik

Abhijeet Zambre

unread,
Mar 19, 2018, 2:33:24 AM3/19/18
to Blockly
I am also trying to integrate Blockly with my current angular 4 application. I have created the custom block and imported the relevant XML to my app. However, I am unable to see the custom block on my app(only the category is visible) and getting the error "Ignoring non-existent field NAME in block my_custom_block". Is there anything else that we need to add to our code like block library or something else?

Abhijeet Zambre

unread,
Mar 19, 2018, 2:37:15 AM3/19/18
to Blockly
Hi Roukaya,

I am also facing similar issue.
If you found the solution , please post it. That would be helpful.
Reply all
Reply to author
Forward
0 new messages