I am trying to setup my very first working basic example of a GIS using GeoExt 3, Openlayers 4.4.1 and ExtJS 6.2.0 within a Symfony2.8.24 project.

The Symfony part I'm used to work with, I am trying to get the GIS part to work. I have gone through several posts and tutorials just to get this going and when thought I had finally figured out the dependencies I should include in my html file, I'm getting this error I don't even have a clue about. Actually, as you can see in the title, it's two errors, which correspond to ext-all.js and ext-all-debug.js respectively.

In other words:

  1. If I include ext-all.js, then TypeError: a is null shows. ext-all.js related error
  2. If I include ext-all-debug.js, then TypeError: contentEl is null shows. enter image description here

Code snippet from my map.js file containing the line which triggers the error:

var description = Ext.create('Ext.panel.Panel', {
            contentEl: 'description',
            title: 'Description',
            height: 200,
            border: false,
            bodyPadding: 5

        Ext.create('Ext.Viewport', {
            layout: 'border',
            items: [
                    xtype: 'panel',
                    region: 'west',
                    width: 400,
                    layout: {
                        type: 'vbox',
                        align: 'stretch'
                    items: [
                        description // <-- THIS IS THE TROUBLESOME ONE

And this is the code snippet in ext-all-debug.js where the line with the error resides:

if (me.contentEl) {
    pre = Ext.baseCSSPrefix;
    hidden = pre + 'hidden-';
    contentEl = me.contentEl = Ext.get(me.contentEl);
    contentEl.component = me; // <-- ERROR RESIDES HERE
        pre + 'hidden',
        hidden + 'display',
        hidden + 'offsets'

Could you tell me why this is happening??

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.