MIGX (2.12.0-pl) on MODX (2.7.1-pl) - Help Needed

Summary

MIGX (2.12.0-pl) does not seem to be functioning on my fresh install of MODX (2.7.1-pl).

Step to reproduce

I have tried uninstalling and reinstalling a few times with the same behavior.

Observed behavior

Firstly, I am receiving the following error on installation:

modAction support is deprecated since version 2.3.0. Support for modAction has been replaced with routing based on a namespace and action name. Please update the extra with the namespace migx to the routing based system.

Secondly, my error logs are full of the following (not sure if it’s related):

[2019-03-30 13:49:58] (ERROR in xPDO::getService @ /core/xpdo/xpdo.class.php : 1234) modRestClient::__construct is deprecated since version 2.3.0. Use the modRest classes instead.
[2019-03-30 13:49:58] (ERROR in modRestCurlClient::__construct @ /core/model/modx/rest/modrestcurlclient.class.php : 26) modRestClient::__construct is deprecated since version 2.3.0. Use the modRest classes instead.

Thirdly, I am receiving JavaScript erros when clicking “Add Item”. Add the “Loading” does not stop (as shown in this screenshot).

Environment

  • MODX: 2.7.1-pl
  • MIGX: 2.12.0-pl
  • PHP: 7.3.3 (edit: updated)
  • MySQL: 5.1.73 (edit: latin1, latin1_swedish_ci)
  • Firefox 66.0.2

Overview

I’m brand new to MODX. I have been learning a lot from some old videos made by Jesse Showalter. I came across MIGX (2.12.0-pl) and I was really hoping this would fulfill my needs, but it does not seem to be working as described in MODX (2.7.1-pl).

I was trying to use the documentation, but it hasn’t been updated in years. :frowning:

So, I can’t seem to do anything with MIGX! Does anyone (@bruno17 ) have an suggestions? Did I miss something? Are their good alternatives out there?

Thank you for any assistance!

Full Install Log: (I have uninstalled and reinstalled a few times…)

Console running...

Attempting to install package with signature: migx-2.12.0-pl
Package found...now preparing to install.
Grabbing package workspace...
Workspace environment initiated, now installing package...
create/upgrade tables
Skipping /core/components/migx/model/migx/migxconfig.class.php; file already exists. Move existing class files to regenerate them.
Skipping /core/components/migx/model/migx/mysql/migxconfig.class.php; file already exists. Move existing class files to regenerate them.
Skipping /core/components/migx/model/migx/migxformtab.class.php; file already exists. Move existing class files to regenerate them.
Skipping /core/components/migx/model/migx/mysql/migxformtab.class.php; file already exists. Move existing class files to regenerate them.
Skipping /core/components/migx/model/migx/migxformtabfield.class.php; file already exists. Move existing class files to regenerate them.
Skipping /core/components/migx/model/migx/mysql/migxformtabfield.class.php; file already exists. Move existing class files to regenerate them.
Skipping /core/components/migx/model/migx/migxconfigelement.class.php; file already exists. Move existing class files to regenerate them.
Skipping /core/components/migx/model/migx/mysql/migxconfigelement.class.php; file already exists. Move existing class files to regenerate them.
Skipping /core/components/migx/model/migx/migxelement.class.php; file already exists. Move existing class files to regenerate them.
Skipping /core/components/migx/model/migx/mysql/migxelement.class.php; file already exists. Move existing class files to regenerate them.
tables upgraded
modAction support is deprecated since version 2.3.0. Support for modAction has been replaced with routing based on a namespace and action name. Please update the extra with the namespace migx to the routing based system.
Prepare menu for MODX Revolution 2.3.x
Successfully installed package migx-2.12.0-pl

Form Tabs: edit

[
  {
    "caption": "Section",
    "fields": [
      {
        "field": "layout_style",
        "caption": "Layout Style",
        "inputTV": "layout_style"
      }
    ]
  },
  {
    "caption": "Layout",
    "fields": [
      {
        "field": "photo",
        "caption": "Section Photo",
        "inputTVtype": "photo_a"
      }
    ]
  }
]

Grid Columns: edit

[
  {
    "header": "Layout",
    "width": "50",
    "sortable": "true",
    "dataIndex": "layout_style"
  },
  {
    "header": "Photo",
    "width": "50",
    "sortable": "false",
    "dataIndex": "photo_a",
    "renderer": "this.renderImage"
  }
]

Hi @Mr_JimWest !

Firstly, those deprecated notices are nothing to worry about. They were introduced in 2.7 to get extras to adapt to the newer practices. You can turn them off in the system settings. Search for log_deprecated and switch it to No.

Also, in regards to your environment I think you should try to upgrade MySQL to 5.6.x as then FULLTEXT indexes are supported under InnoDB. And your PHP version is very out of date too. :wink:

As for the JavaScript error, it’s hard to tell exactly what the issue is from the screenshot, but it could be an error in the json code you’ve entered so it’s not loading correctly.
Are you able to show the json code?

Disclaimer: I haven’t used MIGX in quite a while as I need UTF8mb4 encoding on my db and it wasn’t supported before. It may have been added by now.

Oh and the documentation is being revamped as we speak! It’ll be up to date soon! :smiley:

Hello @muzzstick, nice to meet you, and thank you for your quick reply!

I have turned off the notices.

I’m running MODX off a shared host, so I’m not sure I will be able to get MySQL updated - stay tuned. I’m also not sure what InnoDB is, but I will look into that. :thinking:

I have adjusted my PHP version to 7.3 without anything breaking…yet.

Here is my Form Tabs and Grid Columns in my MIGX Template Variable…

Form Tabs:

[
  {
    "caption": "Section",
    "fields": [
      {
        "field": "layout_style",
        "caption": "Layout Style",
        "inputTV": "layout_style"
      }
    ]
  },
  {
    "caption": "Layout",
    "fields": [
      {
        "field": "photo",
        "caption": "Section Photo",
        "inputTVtype": "photo_a"
      }
    ]
  }
]

Grid Columns:

[
  {
    "header": "Layout",
    "width": "50",
    "sortable": "true",
    "dataIndex": "layout_style"
  },
  {
    "header": "Photo",
    "width": "50",
    "sortable": "false",
    "dataIndex": "photo_a",
    "renderer": "this.renderImage"
  }
]

You say you haven’t used MODX in a white. I’m looking for the capability of being able to add more content to a page dynamically, not knowing how much or how little the extent of the content may be. In comparison to a fixed-template which seems to be stock from MODX. Maybe I’m going about this all wrong. Do you recommend another way?

Speaking of “UTF8mb4” encoding…I think that’s what I’m using. :scream:

When I have a moment I will break down my entire process of what I have done so far. I realize that I may have messed up on some simple step somewhere.

Thank you for your time!

Oh I mean I haven’t used MIGX in a while, I use MODX nearly every day! :wink:

The JSON looks fine to me.
I’ve used this guide before which worked: https://docs.modx.com/extras/revo/migx/migx.backend-usage

It’ll be worth checking if you actually are using UTF8mb4 or just UTF8.
If it is UTF8mb4 encoding that could very well be the reason it’s not working.

In terms of dynamic content on a page, this is what MODX excels at.
There are quite a few different ways of going about it.

For example you could use getResources (or pdoTools) to get lists of content from other resources.
https://docs.modx.com/extras/revo/getresources

and keep all the resources with data you need in a collection:
https://docs.modx.com/extras/revo/collections

You could use the new Fred extra to dynamically create content on a page:
https://fred.modx.com/
https://modxcms.github.io/fred/

For paid options you could use ContentBlocks or MoreGallery from modMore

Perhaps you could let us know the type of dynamic content you’d like to add and I can be more specific.
First check that db encoding though to check if MIGX should work or not.

Cheers!

Sorry @muzzstick, I meant to say MIGX before, not MODX. :sleeping:

The defaults for the DB are actually: latin1, latin1_swedish_ci.

Let me try to explain what I am looking to do: imagine a multi-page website, each page has multiple sections, each section has an option for different layouts. Neither the amount of sections per-page, nor the layout options for each section are standardized.

Here is an example:

If I could make a grouping of standardized fields (layout, photo 1, photo 2, richtext), and allow the user to repeat them to no end, and then configure those choices on the backend for the user, I would be set --but how? I got the impression that MIGX would do the trick.


I understand that I could do this with resources/collections, but then each page would have a ton of resources, managing that would be a nightmare. I saw the Fred extra, but I’m not interested in in-page editing. It also appears to just be a re-work of the MODX UI. I also ran into ContentBlocks from modMore, which did actually look like it would do the job, but I’m not in a place in this project where I can afford to put money down.

Thank you again for your continued assistance.

@Mr_JimWest within your MIGX TV you could add a selectDisplay list field which allows you to choose the display of that particular entry.
When you call using getImageList you could do a test for which selectDisplay you wish to use. This could then be linked to a particular chunk that has the particular display. The test could be done using If or a snippet.

Hope this makes sense.

Thank you. At the moment though, I can’t seem to get MIGX to work. :frowning:

Right ok, I see. In that case let’s try to figure out what is wrong with your MIGX install.
The screenshot you posted at the top with the JS errors is occurring on the MIGX CMP it looks like.

Clicking on Add Item causes the error? Did it ever work or it was like this since the first time?
If it was the same with install I’m guessing it didn’t install properly. Can you try going into the package manager and re-download the package and then reinstall it?

I think, you are looking for something like that
https://docs.modx.com/extras/revo/migx/migx.tutorials/migx.varying-layout-boxes/migx.varying-layout-boxes.configurator-version

Thank you @muzzstick.

No, I have literally been at MODX for just a couple of days, MIGX has never functioned. :disappointed:

I have started from the top, here is what I have done:

  1. Removed previous MIGX variable from template.
  2. Deleted previous MIGX variable.
  3. Uninstalled (not restore or preserve) MIGX - Package successfully uninstalled with signature: migx-2.12.0-pl.
  4. Forced removed MIGX package: Package successfully removed.
  5. Downloaded MIGX from the package browser and installed it: Successfully installed package migx-2.12.0-pl.

Navigated to the MIGX Management page, almost everything I click I get a JS error:

TypeError: this.mask.el is undefined[Learn More] modx.jsgrps-min.js:1:115147
TypeError: this.mask.addClass is not a function[Learn More] modx.jsgrps-min.js:1:114371
TypeError: this.mask.el is undefined[Learn More] modx.jsgrps-min.js:1:115147
TypeError: this.mask.addClass is not a function[Learn More] modx.jsgrps-min.js:1:114371
TypeError: this.mask.el is undefined[Learn More] modx.jsgrps-min.js:1:115147
TypeError: this.mask.addClass is not a function[Learn More] modx.jsgrps-min.js:1:114371
TypeError: this.mask.el is undefined[Learn More] modx.jsgrps-min.js:1:115147
TypeError: this.mask.addClass is not a function[Learn More] modx.jsgrps-min.js:1:114371
TypeError: this.mask.el is undefined[Learn More] modx.jsgrps-min.js:1:115147

  1. Created a new template variable called “sections”, placed it in a MIGX category, and gave it a input type of “migx”.
  2. Gave it access to one of my templates, and added my previously mentioned form tabs and grid columns to their respective fields.
  3. Navigated to one of the resources using that template, went to the Template Variable tab, clicked “Add Item” under the MIGX tab, same errors and endless “Loading…” problem occurs.

What did I miss? :cry:

Variables and Current Extras:

EDIT: Just loading the MIGX Management page, I get an error.

onShow /manager/assets/modext/modx.jsgrps-min.js:1
    ExtJS 3
    
    afterShow
    
    show
    
    show
    onAjaxException /manager/assets/modext/core/modx.js?v=09250c22:122
    ExtJS 3
    
    fire
    
    fireEvent
    
    handleFailure
    f /manager/assets/ext3/adapter/ext/ext-base.js:21
    m /manager/assets/ext3/adapter/ext/ext-base.js:21
    createCallback /manager/assets/ext3/adapter/ext/ext-base.js:21

Yeah you should not be getting javascript errors when loading the MIGX manager page.

I wonder if there’s some kind of conflict. Have you got any custom plugins active?
Try deactivating all of your plugins and see if the same thing happens.

To do that click the Elements tab at the top of the tree, go down to plugins and you can right click on each one and select “Deactivate Plugin”. Once they’re all deactivated, go back to the MIGX page and see if you still get the errors.

@muzzstick, I just went through and did that. Same problem. I even tried disabling the MIGX plugins, same thing.

Looks like the same issue here:
https://forums.modx.com/thread/?thread=104369

@bruno17 any ideas on this one?

Edit:
Also this similar one which was solved by setting the correct file/folder permissions.
https://forums.modx.com/thread/104477/500-error-blank-overlay-fresh-install-2-6-5

@Mr_JimWest it might be worth checking permissions to see if that’s the reason it can’t access the js file.

yeah, could be file-permissions

1 Like

No dice. :weary:

I looked through the entirety of MODX, each folder is set to 755, Including: “/manager/assets/modext”; where “modx.jsgrps-min.js” lives.

I was reading about some discrepancy in browsers here, thank you Google Translate.

So I took a look at my MODX/MIGX problem in Chrome, check out this new error:

/assets/components/migx/connector.php Failed to load resource: the server responded with a status of 500 (Internal Server Error) Uncaught TypeError: this.mask.addClass is not a function

and:

ext-base.js:21 POST /assets/components/migx/connector.php 500 (Internal Server Error)i @ ext-base.js:21Ext.lib.Ajax.k.request @ ext-base.js:21Ext.extend.request @ ext-all.js:21Ext.extend.doRequest @ ext-all.js:21Ext.extend.request @ ext-all.js:21Ext.data.Store.Ext.extend.execute @ ext-all.js:21Ext.data.Store.Ext.extend.load @ ext-all.js:21(anonymous function) @ modx.jsgrps-min.js:1(anonymous function) @ ext-all.js:21Ext.form.Field.Ext.extend.initValue @ ext-all.js:21Ext.form.ComboBox.Ext.extend.initValue @ ext-all.js:21Ext.form.Field.Ext.extend.afterRender @ ext-all.js:21(anonymous function) @ ext-all.js:21Ext.form.TriggerField.Ext.extend.afterRender @ ext-all.js:21Ext.extend.render @ ext-all.js:21Ext.layout.TableLayout.Ext.extend.renderItem @ ext-all.js:21Ext.layout.ContainerLayout.Ext.extend.renderAll @ ext-all.js:21Ext.layout.TableLayout.Ext.extend.onLayout @ ext-all.js:21Ext.layout.ContainerLayout.Ext.extend.layout @ ext-all.js:21Ext.Container.Ext.extend.doLayout @ ext-all.js:21Ext.Container.Ext.extend.doLayout @ ext-all.js:21(anonymous function) @ ext-all.js:21Ext.apply.each @ ext-base.js:21Ext.Panel.Ext.extend.initEvents @ ext-all.js:21Ext.grid.GridPanel.Ext.extend.initEvents @ ext-all.js:21Ext.grid.EditorGridPanel.Ext.extend.initEvents @ ext-all.js:21Ext.Panel.Ext.extend.afterRender @ ext-all.js:21Ext.grid.GridPanel.Ext.extend.afterRender @ ext-all.js:21Ext.extend.render @ ext-all.js:21Ext.layout.ContainerLayout.Ext.extend.renderItem @ ext-all.js:21Ext.layout.ContainerLayout.Ext.extend.renderAll @ ext-all.js:21Ext.layout.ContainerLayout.Ext.extend.onLayout @ ext-all.js:21Ext.layout.AutoLayout.Ext.extend.onLayout @ ext-all.js:21Ext.layout.ContainerLayout.Ext.extend.layout @ ext-all.js:21Ext.Container.Ext.extend.doLayout @ ext-all.js:21Ext.layout.CardLayout.Ext.extend.setActiveItem @ ext-all.js:21Ext.TabPanel.Ext.extend.setActiveTab @ ext-all.js:21Ext.TabPanel.Ext.extend.onStripMouseDown @ ext-all.js:21I @ ext-all.js:21

Thank you for your continued help!

Have a look in your PHP logs and also the MODX log to see if there’s anything that appears when you try to load the MIGX page.

You mentioned it’s a shared server, is it CPanel?
CPanel usually has an “Errors” section which can be helpful.

Possible to have a look into your manager?

@muzzstick, I appreciate your dedication here.

Two errors stood out:

  1. SoftException in Application.cpp:651: Directory "/assets/components" is writeable by group, referer: /manager/?a=index&namespace=migx&configs=packagemanager||migxconfigs||setup
  2. PHP Fatal error: require_once(): Failed opening required '/core/components/quip/model/quip/quip.class.php' (include_path='.:/opt/alt/php73/usr/share/pear') in /core/cache/includes/elements/modplugin/16.include.cache.php on line 10, referer: /manager/?a=system/settings

Looking at this second error got me confused. I don’t have a folder named quip. I don’t have a file named “quip.class.php” on the server. It turns out it’s an extra. I tried installing it and received the following:

Console running...

Attempting to install package with signature: quip-2.3.3-pl
Package found...now preparing to install.
Grabbing package workspace...
Workspace environment initiated, now installing package...
Error adding field quipComment->name: Array ( [0] => 42S21 [1] => 1060 [2] => Duplicate column name 'name' )
Error adding field quipComment->email: Array ( [0] => 42S21 [1] => 1060 [2] => Duplicate column name 'email' )
Error adding field quipComment->website: Array ( [0] => 42S21 [1] => 1060 [2] => Duplicate column name 'website' )
Error adding field quipComment->resource: Array ( [0] => 42S21 [1] => 1060 [2] => Duplicate column name 'resource' )
Error adding field quipComment->idprefix: Array ( [0] => 42S21 [1] => 1060 [2] => Duplicate column name 'idprefix' )
Error adding field quipComment->existing_params: Array ( [0] => 42S21 [1] => 1060 [2] => Duplicate column name 'existing_params' )
Error adding index resource to quipComment: Array ( [0] => 42000 [1] => 1061 [2] => Duplicate key name 'resource' )
Error adding field quipComment->ip: Array ( [0] => 42S21 [1] => 1060 [2] => Duplicate column name 'ip' )
Error adding field quipComment->rank: Array ( [0] => 42S21 [1] => 1060 [2] => Duplicate column name 'rank' )
Error adding field quipComment->approvedby: Array ( [0] => 42S21 [1] => 1060 [2] => Duplicate column name 'approvedby' )
Error adding field quipComment->deleted: Array ( [0] => 42S21 [1] => 1060 [2] => Duplicate column name 'deleted' )
Error adding field quipComment->deletedon: Array ( [0] => 42S21 [1] => 1060 [2] => Duplicate column name 'deletedon' )
Error adding field quipComment->deletedby: Array ( [0] => 42S21 [1] => 1060 [2] => Duplicate column name 'deletedby' )
Error adding index approvedby to quipComment: Array ( [0] => 42000 [1] => 1061 [2] => Duplicate key name 'approvedby' )
Error adding index deleted to quipComment: Array ( [0] => 42000 [1] => 1061 [2] => Duplicate key name 'deleted' )
Error adding index deletedby to quipComment: Array ( [0] => 42000 [1] => 1061 [2] => Duplicate key name 'deletedby' )
Error adding field quipThread->quip_call_params: Array ( [0] => 42S21 [1] => 1060 [2] => Duplicate column name 'quip_call_params' )
Error adding field quipThread->quipreply_call_params: Array ( [0] => 42S21 [1] => 1060 [2] => Duplicate column name 'quipreply_call_params' )
Could not load class: quipNotifyComment from mysql.quipnotifycomment.
Could not load class: quipNotifyComment from mysql.quipnotifycomment.
Successfully installed package quip-2.3.3-pl

I don’t remember ever seeing “quip” before, but all of the columns already existed…strange. After the error-full install of Quip, I still do not have a “quip” folder where MODX is looking for it. I tried uninstalling both MIGX and Quip and installing them in reverse order - doesn’t matter.

@bruno17, are you asking to take a peek at my MODX CMS yourself?

that was the idea. Maybe, I can see, where it wents wrong with a quick look at it.

Aha! So it is permissions causing the issue.
According to the error, your web host is complaining that the assets/components directory is too open and is thus cutting off access to it.
It’s writeable by ‘group’ so would be 775 whereas it actually needs to be 755.
There may be other files and folders incorrectly set too, so it would be easiest to fix if your webhost allows SSH access. Then you could enter some commands like this:

I assume the errors about Quip are caused by the same thing.
Did you install the extra “Articles”? That comes with Quip included.
(That being said, I’d recommend against using Articles as it’s quite old. Go with Collections instead)