Revo Development - MODX Community Forums https://forums.modx.com/board/?board=44 <![CDATA[Forcing HTTPS and using friendly URLs.]]> https://forums.modx.com/thread/102335/forcing-https-and-using-friendly-urls#dis-post-564229
My templates, chuncks and pages are all generic settings. There is no http: so the site should convet to https: fairly easily I would assume.

First I found that I was supposed to change this setting from http to https:

System Settings: server_protocol
Value: https

I believe my .htaccess file is the problem. This is what I have:

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

RewriteCond %{HTTP_HOST} ^MyWebsite\.biz$ [OR]
RewriteCond %{HTTP_HOST} ^www\.MyWebsite\.biz$
RewriteRule ^/?$ "https\:\/\/www\.My\-Website\.com" [R=301,L]

RewriteCond %{HTTP_HOST} ^MyWebsite\.co$ [OR]
RewriteCond %{HTTP_HOST} ^www\.MyWebsite\.co$
RewriteRule ^/?$ "https\:\/\/www\.My\-Website\.com" [R=301,L]

RewriteCond %{HTTP_HOST} ^MyWebsite\.net$ [OR]
RewriteCond %{HTTP_HOST} ^www\.MyWebsite\.net$
RewriteRule ^/?$ "https\:\/\/www\.My\-Website\.com" [R=301,L]

RewriteCond %{HTTP_HOST} ^MyWebsite\.us$ [OR]
RewriteCond %{HTTP_HOST} ^www\.MyWebsite\.us$
RewriteRule ^/?$ "https\:\/\/www\.My\-Website\.com" [R=301,L]

RewriteCond %{HTTP_HOST} ^MyWebsite\.info$ [OR]
RewriteCond %{HTTP_HOST} ^www\.MyWebsite\.info$
RewriteRule ^/?$ "https\:\/\/www\.My\-Website\.com" [R=301,L]


I have found this code posted in the forums:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.your_domain.com$
RewriteRule ^(.*)$ http://www.your_domain.com/$1 [R=301]


but it doesn't work when pasted in my .htaccess. I assume due to these existing lines. I don't know how to merge this. Can anyone help me out here. Really need my site to automatically direct to HTTPS:// when non-secure is clicked.
]]>
https://forums.modx.com/thread/102335/forcing-https-and-using-friendly-urls#dis-post-564229 Mon, 25 Feb 2019 01:30:38 +0000 https://forums.modx.com/thread/102335/forcing-https-and-using-friendly-urls#dis-post-564229
<![CDATA[Can't configure multiples emails en formit &emailTo]]> https://forums.modx.com/thread/104909/can-t-configure-multiples-emails-en-formit-emailto#dis-post-564100
What I am doing is sending an email message using Formit and email snippet, I have a form to write down there multiples emails separated with comma. If I put in the form field one email address it works (the email message is sended) if I put more that one in the field form doesn't work, if I put more that one directly in the formit parameter $emailTo it works.

 
[[!FormIt? 
&hooks=`email` 
&validate=`emails:required`
&successMessage=`<h2 style="color:green">Your invitation was sent to [[+emails]]!</h2>`
&emailTpl=`email_event`
&emailSubject=`Event Invitation - [[+eventName]] - [[!+company]]`
&emailTo=`[[+emails]]`
 ]]

        <form action="[[~[[*id]]]]" method="post" id="eventform" >
        <label>Describe a list of emails separated by comma</label>
        <input type="text" name="emails" id="emails" value=""/>
        <input type="hidden" name="eventName" value=""/>
        <button type="submit" class="btn">Send</button>

        </form>


]]>
https://forums.modx.com/thread/104909/can-t-configure-multiples-emails-en-formit-emailto#dis-post-564100 Sat, 16 Feb 2019 06:44:48 +0000 https://forums.modx.com/thread/104909/can-t-configure-multiples-emails-en-formit-emailto#dis-post-564100
<![CDATA[How to set the friendly name and description of system settings using code]]> https://forums.modx.com/thread/104903/how-to-set-the-friendly-name-and-description-of-system-settings-using-code#dis-post-564095
I can create the setting with its key, type, value, namespace, and area settings with no problem and it shows up nicely in the Manager grid.

However, I can't set the name and description that appear in the Manager grid for users to tell them what these are. Looking at the MODX docs, that makes sense because these don't appear to be part of the modSystemSetting object, but I'm not clear how they actually do get set and stored. Is there a special method or a related object one has to work with? Can anyone help?

Here's the relevant code:

$newSettingProps=
	array(
	  'key' => 'new_setting',             //works
	  'name' => 'New Setting',            //THIS VALUE IS IGNORED
	  'description' => 'New Test Desc',   //THIS VALUE IS IGNORED
	  'xtype' =>  'combo-boolean',        //works
	  'namespace' => 'my_namespace',      //works
	  'area' => 'Test',                   //works
	  'value' => '1',                     //works
	);

$newSetting = $modx->newObject('modSystemSetting');
foreach ($newSettingProps as $key => $value) {
    $newSetting->set($key,$value);
}
$newSetting->save();


Thank you...]]>
https://forums.modx.com/thread/104903/how-to-set-the-friendly-name-and-description-of-system-settings-using-code#dis-post-564095 Fri, 15 Feb 2019 11:30:05 +0000 https://forums.modx.com/thread/104903/how-to-set-the-friendly-name-and-description-of-system-settings-using-code#dis-post-564095
<![CDATA[Symlink cache / getResources:ifempty]]> https://forums.modx.com/thread/104765/symlink-cache-getresources-ifempty#dis-post-563426
I have an issue with a symlink-scenario, maybe someone can assist me. On my customers website the resource-structure is as follows:

- Speakers [3] (speakers.html - always symlinked to the latest year = 2019)
--- 2018 [10] (speakers/2018/)
--- 2019 [49] (speakers/2019/)

Each year contains several resources/speakers like

- /speakers/2018/speakername1.html
- /speakers/2018/speakername2.html
- /speakers/2018/speakername3.html
- /speakers/2019/speakername1.html
- /speakers/2019/speakername2.html
- /speakers/2019/speakername3.html
- ...


The template contains a getResources-call like follows, to show whether a list of speakers, or a "coming soon"-chunk :

[[getResources:ifempty=`[[$comingsoon]]`? 
   &parents=`[[*id]]`
   &context=`web`
   &depth=`0`
   &hideContainers=`1`
   &showHidden=`1`
   &limit=`0`
   &sortby=`menuindex`
   &sortdir=`ASC`
   &includeTVs=`1`
   &processTVs=`1`
   &tpl=`tpl_item_speaker`
]]



Now my issue happens as follows

  • I clear MODX-cache manually or by editing/saving a resource
  • I call url /speakers.html (symlinked to speakers/2019/) but it will show the "coming soon"-chunk, even when resources exist and should be listed by getResources

To overcome this issue I am forced to

  • call /speakers/2019/ always first after cache has been cleared by any event or action
  • then /speakers.html will show the resources-list of /speakers/2019/ like it should

I am not sure how to solve this issue, can someone maybe give me a hint?


Cheers!]]>
https://forums.modx.com/thread/104765/symlink-cache-getresources-ifempty#dis-post-563426 Thu, 03 Jan 2019 10:09:45 +0000 https://forums.modx.com/thread/104765/symlink-cache-getresources-ifempty#dis-post-563426
<![CDATA[Is it possible to get a modUser based on just a profile field?]]> https://forums.modx.com/thread/104048/is-it-possible-to-get-a-moduser-based-on-just-a-profile-field#dis-post-563407 https://forums.modx.com/thread/104048/is-it-possible-to-get-a-moduser-based-on-just-a-profile-field#dis-post-563407 Mon, 31 Dec 2018 05:20:19 +0000 https://forums.modx.com/thread/104048/is-it-possible-to-get-a-moduser-based-on-just-a-profile-field#dis-post-563407 <![CDATA[Can I/should I extend modResource just to define a composite relationship?]]> https://forums.modx.com/thread/104685/can-i-should-i-extend-modresource-just-to-define-a-composite-relationship#dis-post-563116
Thanks!

Jeff]]>
https://forums.modx.com/thread/104685/can-i-should-i-extend-modresource-just-to-define-a-composite-relationship#dis-post-563116 Wed, 05 Dec 2018 02:34:01 +0000 https://forums.modx.com/thread/104685/can-i-should-i-extend-modresource-just-to-define-a-composite-relationship#dis-post-563116
<![CDATA[PDO Page conditions]]> https://forums.modx.com/thread/104687/pdo-page-conditions#dis-post-563099
i try to get postings in pdoPage with this conditions:

- all postings with "premium==no"
AND
- only posting that have "premium==yes" and "ent10>=5"

With my wrong code i get only "premium" postings..:
[[!pdoPage?
   &parents=`50`
   &includeTVs=`ent10,premium` 
   &sortby=`{"ent10":"ASC"}` 
   &tpl=`custom_tpl` 
   &tvFilters=`premium==yes,ent10>=5`
]]


Please help smiley]]>
https://forums.modx.com/thread/104687/pdo-page-conditions#dis-post-563099 Wed, 05 Dec 2018 01:09:08 +0000 https://forums.modx.com/thread/104687/pdo-page-conditions#dis-post-563099
<![CDATA[Saving your CMP form using the page toolbar with the parameters "reload" and "process".]]> https://forums.modx.com/thread/99673/saving-your-cmp-form-using-the-page-toolbar-with-the-parameters-reload-and-process#dis-post-562990
I've built a CMP that contains a form panel with some fields. The behaviour I'm looking for is similar to how MODX handles new resources or chunks, etc. namely that once the new element is saved, the page loads the update version of the form with the newly created element loaded.

Here is my page code:

Ext.onReady(function() {
    MODx.load({ xtype: 'pop-page-events-create-manifest' });
});
Pop.page.EventsCreateManifest = function(config) {
    config = config || {};
    Ext.applyIf(config,{
        formpanel: 'pop-panel-events-create-manifest'
        ,buttons: [{
            reload: true
            ,text: _('pop.save')
            ,id: 'pop-manifest-btn-save'
            ,cls: 'primary-button'
            ,process: 'mgr/events/popmanifestcreate'
            ,params: {
                namespace: 'popupstudio'
            }
            ,method: 'remote'
            ,keys: [{
                key: MODx.config.keymap_save || 's'
                ,ctrl: true
            }]
        },{
            text: _('pop.cancel')
            ,handler: function() {
	        	location.href = '?a=events/home&namespace=popupstudio&activeTab=2';
	        }
	        ,scope:this
        }]
        ,components: [{
            xtype: 'pop-panel-events-create-manifest'
            ,renderTo: 'pop-panel-events-create-manifest-div'
        }]
    });
    Pop.page.EventsCreateManifest.superclass.constructor.call(this,config);
};
Ext.extend(Pop.page.EventsCreateManifest,MODx.Component);
Ext.reg('pop-page-events-create-manifest',Pop.page.EventsCreateManifest);


I have the whole thing working except for the redirect. The page I keep getting redirected to is

http://mydomain:8080/manager/?a=mgr/events/popmanifestupdate&namespace=popupstudio&id=48

The page I want to get to is

http://mydomain:8080/manager/?a=events/updatemanifest&namespace=popupstudio&id=48

I looked at the code for modx.component.js and it seems that when reload is true, it's taking the process value, replacing "create" with "update" and the result is being used as the first parameter in a MODx.loadPage() call. Here are lines 322 to 330 of modx.component.js:

            var action;
            if (o.actions && o.actions.edit) {
                // If an edit action is given, use it (BC)
                action = o.actions.edit;
            } else {
                // Else assume we want the 'update' controller
                action = itm.process.replace('create', 'update');
            }
            MODx.loadPage(action, url);


Correct me if I'm wrong but what was once my processor call is now becoming my action call for my controller? Am I understanding this correctly? It's driving me crazy because the two aren't interchangeable. I mean, it works for elements like resources and the like but it doesn't really work for CMP namely because the processor calls usually have the "mgr/" prefix.

I guess I'm wondering if I'm going about this the right way. Should I continue to try and use the "reload" parameter or should I ditch that, and redirect on the form panel's success event and load the update form "manually"? Some guidance would be appreciated. I want to take advantage of the "MODX way" of doing things but it seems like this reload parameter is more trouble than it's worth.]]>
https://forums.modx.com/thread/99673/saving-your-cmp-form-using-the-page-toolbar-with-the-parameters-reload-and-process#dis-post-562990 Thu, 29 Nov 2018 04:16:48 +0000 https://forums.modx.com/thread/99673/saving-your-cmp-form-using-the-page-toolbar-with-the-parameters-reload-and-process#dis-post-562990
<![CDATA[Link Actionbutton with beforeSave event]]> https://forums.modx.com/thread/104672/link-actionbutton-with-beforesave-event#dis-post-562962
I'm trying to develop as custom Extra. I was following the guide from Modx for extras.
As the pop-up window is too small for all my fields I'm trying to develop a page for CRUD-Operations.

I tried to copy from the default workspace/package.
From there I have a component as page:

Kinderherzfuehrer.page.Praxis = function(config) {
    config = config || {};
    Ext.applyIf(config,{
        formpanel: 'kinderherzfuehrer-panel-praxis'
        ,components: [{
            xtype: 'kinderherzfuehrer-panel-praxis'
            ,id: MODx.request.id
        }]
        ,buttons: [{
            process: 'save'
            ,url: Kinderherzfuehrer.config.connectorUrl
            ,baseParams: { action: 'mgr/praxen/update' }
            ,text: _('save')
            ,id: 'modx-abtn-save'
            ,cls: 'primary-button'
            ,method: 'remote'
            //,checkDirty: true
            ,keys: [{
                key: MODx.config.keymap_save || 's'
                ,alt: true
                ,ctrl: true
            }]

        },{
            process: 'cancel'
            ,text: _('cancel')
            ,id: 'modx-abtn-cancel'
            ,handler: function() {
                MODx.loadPage('index', 'namespace=kinderherzfuehrer');
            }
        }]
    });
    Kinderherzfuehrer.page.Praxis.superclass.constructor.call(this,config);
};
Ext.extend(Kinderherzfuehrer.page.Praxis,MODx.Component);
Ext.reg('kinderherzfuehrer-page-praxis',Kinderherzfuehrer.page.Praxis);


As I understood the default action buttons are defined here.

Secondly I have a JS-file for the panel (for here are only two fields in list...)

Kinderherzfuehrer.panel.Praxis = function(config) {
    config = config || {};
    Ext.applyIf(config,{
        id: 'modx-panel-package'
        ,url: Kinderherzfuehrer.config.connectorUrl
        ,baseParams: { action: 'mgr/praxen/update' }
        ,cls: 'container'
        ,chunk: ''
        ,bodyStyle: ''
        ,items: [{
            html: _('package')
            ,id: 'modx-package-header'
            ,xtype: 'modx-header'
        },MODx.getPageStructure([{
            title: _('general')
            ,defaults: { border: false }
            ,layout: 'form'
            ,id: 'modx-package-form'
            ,labelWidth: 150
            ,items: [{
                xtype: 'panel'
                ,border: false
                ,cls:'main-wrapper'
                ,layout: 'form'
                ,items: [{
                        xtype: 'hidden'
                        ,name: 'id'
                        ,value: config.id
                    },{
                    xtype: 'textfield'
                    ,fieldLabel: _('anrede')
                    ,name: 'anrede'
                    ,width: 300
                },{
                        xtype: 'textfield'
                        ,fieldLabel: _('titel')
                        ,name: 'titel'
                        ,width: 300
                    }
                       ]
            }]
        }]
        )]
        ,listeners: {
            'setup': {fn:this.setup,scope:this}
            ,'success': {fn:this.success,scope:this}
            ,'beforeSubmit': {fn:this.beforeSubmit,scope:this}
            ,'fieldChange': {fn:this.fieldChange, scope:this}
        }
    });
    Kinderherzfuehrer.panel.Praxis.superclass.constructor.call(this,config);
};
Ext.extend(Kinderherzfuehrer.panel.Praxis,MODx.FormPanel,{
    initialized: false
    ,setup: function() {
        if (this.config.id === '' || this.config.id === 0 || this.initialized) {
            this.fireEvent('ready');
            return false;
        }
        MODx.Ajax.request({
            url: Kinderherzfuehrer.config.connectorUrl
            ,params: {
                action: 'mgr/praxen/get'
                ,id: this.config.id
            }
            ,listeners: {
                'success': {fn:function(r) {
                        this.getForm().setValues(r.object);
                        Ext.getCmp('modx-package-header').getEl().update(_('package')+': '+r.object.id);
                        this.fireEvent('ready',r.object);

                        this.initialized = true;
                    },scope:this}
            }
        });
    }
    ,beforeSubmit: function(o) {
        return this.fireEvent('save',{
            values: this.getForm().getValues()
        });
    }
    ,success: function(r) {
    }
    ,fieldChange: function(c) {
        console.log(c.field);
    }
});
Ext.reg('kinderherzfuehrer-panel-praxis',Kinderherzfuehrer.panel.Praxis);




If I press the "save"-button nothing is happening.
Any help?

Thanks Bernhard

P.S.: The processor are working when using the pop-up-window...]]>
https://forums.modx.com/thread/104672/link-actionbutton-with-beforesave-event#dis-post-562962 Tue, 27 Nov 2018 03:56:52 +0000 https://forums.modx.com/thread/104672/link-actionbutton-with-beforesave-event#dis-post-562962
<![CDATA[How to extract diferent tpl variables for 1 resource?]]> https://forums.modx.com/thread/104598/how-to-extract-diferent-tpl-variables-for-1-resource#dis-post-562602
How can i query the DB in order to extract multiple tpl variables for 1 resource?

i mean, as you already know, THE TABLE modx_site_content contains pagetitle and content in this table.

THE TABLE modx_site_tmplvar_contentvalues contains the tplvars a user created for different purposes: it contains as columns contentid(which refers to the id in modx_site_content) and value(which contains the value of, for example, image-description, image and SEO-Title)

modx_site_content
-----------------------------------------------------------
id | pagetitle | content
-----------------------------------------------------------
1 article 1 this is the content1...
2 article 2 this is the content2...


modx_site_tmplvar_contentvalues
-------------------------------------------------------------
tmplvarid | contentid | value
-------------------------------------------------------------
1 1 path-to-image1.jpg
2 1 description for image1
3 1 SEO title for article 1
1 2 path-to-image2.jpg
2 2 description for image2
3 2 SEO title for article 2

i would like this result:

pagetitle | content | image(it contains the url) | image-description | SEO-Title
----------------------------------------------------------------------------------------------------------------
article 1 | this is the content1... | path-to-image.jpg | description for image1 | SEO title for article 1
article 2 | this is the content2... | path-to-image2.jpg | description for image2 | SEO title for article 2


Thanks and would appreciate your help
sorry, file attachment(table-ok.jpg) ifs for the table(screenshot)]]>
https://forums.modx.com/thread/104598/how-to-extract-diferent-tpl-variables-for-1-resource#dis-post-562602 Wed, 07 Nov 2018 03:34:27 +0000 https://forums.modx.com/thread/104598/how-to-extract-diferent-tpl-variables-for-1-resource#dis-post-562602
<![CDATA[The simplist of 'forums' in Modx]]> https://forums.modx.com/thread/104541/the-simplist-of-forums-in-modx#dis-post-562471
No PMs. No smilies. No other functions. User registration and ability to post a topic and reply to other topics.

Threaded topics with replies. Hard?]]>
https://forums.modx.com/thread/104541/the-simplist-of-forums-in-modx#dis-post-562471 Thu, 01 Nov 2018 03:44:25 +0000 https://forums.modx.com/thread/104541/the-simplist-of-forums-in-modx#dis-post-562471
<![CDATA[function get() on null]]> https://forums.modx.com/thread/104558/function-get-on-null#dis-post-562433
I get this error in my snippet:

MODx Revo 2.6.5
PHP 7

Fatal error: Uncaught Error: Call to a member function get() on null in /core/cache/includes/elements/modsnippet/186.include.cache.php:21 Stack trace: #0 /core/model/modx/modscript.class.php(70): include() #1 /core/model/modx/modparser.class.php(536): modScript->process(NULL) #2 /core/components/pdotools/model/pdotools/pdoparser.class.php(273): modParser->processTag(Array, true) #3 /core/model/modx/modparser.class.php(250): pdoParser->processTag(Array, true) #4 /core/components/pdotools/model/pdotools/pdoparser.class.php(65): modParser->processElementTags('', '<!doctype html>...', true, false, '[[', ']]', Array, 9) #5 /core/model/modx/modresponse.class.php(69): pdoParser->processElementTags('', '<!doctype html>...', true, false, '[[', ']]', Array, 10) #6 /core/model/modx/modrequ in /core/cache/includes/elements/modsnippet/186.include.cache.php on line 21


MyFF Snippet:

<?php
/*


$tv = Name der Template Variablen
$id = ID der Ressource

Beispiel: [[!myFF? &tv=`pagetitle` &id=`27`]]
*/

//------------ Template Variable einer bestimmten Ressource-ID ausgeben ---------------------//
   $parent = $modx->getObject('modResource', $id);

    //Der Aufruf zwischen den RessourceFields und den vom User angelegten TV's unterscheidet sich durch "get" und "getTVValue", deswegen if else...//
    
    if  ($tv == "pagetitle" or $tv == "longtitle" or $tv == "description" or $tv == "alias" or $tv == "link_attributes" or $tv == "published" or $tv == "pub_date" or $tv == "unpub_date" or $tv == "parent" or
        $tv == "isfolder" or $tv == "introtext" or $tv == "content" or $tv == "richtext" or $tv == "template" or $tv == "menuindex" or $tv == "searchable" or $tv == "cacheable" or $tv == "createdby" or
        $tv == "createdon" or $tv == "editedby" or $tv == "editedon" or $tv == "deleted" or $tv == "deletedon" or $tv == "deletedby" or $tv == "publishedon" or $tv == "publishedby" or $tv == "menutitle" or
        $tv == "donthit" or $tv == "privateweb" or $tv == "privatemgr" or $tv == "content_dispo" or $tv == "hidemenu" or $tv == "class_key" or $tv == "context_key" or $tv == "content_type" or $tv == "uri" or
        $tv == "uri_override" or $tv == "hide_children_in_tree" or $tv == "show_in_tree" or $tv == "properties")
        {return $parent->get($tv);}
    else if ($tv == null) {return "Keine Werte gefunden!";}  
    
    else {
        if ($parent->getTVValue($tv) != null) {return $parent->getTVValue($tv);}
        else {return "TV nicht gefunden oder enthält keine Werte!";}
    }



Please help, i dont understand what's wrong with get()?]]>
https://forums.modx.com/thread/104558/function-get-on-null#dis-post-562433 Tue, 30 Oct 2018 08:35:37 +0000 https://forums.modx.com/thread/104558/function-get-on-null#dis-post-562433
<![CDATA[Re: Step By Step - How to import Excel data and how to show them on front end page?]]> https://forums.modx.com/thread/86471/re-step-by-step---how-to-import-excel-data-and-how-to-show-them-on-front-end-page?page=5#dis-post-562356
http://rtfm.modx.com/extras/revo/migx

Or you could use ImportX to import CSV data:

http://rtfm.modx.com//display/ADDON/importx]]>
https://forums.modx.com/thread/86471/re-step-by-step---how-to-import-excel-data-and-how-to-show-them-on-front-end-page?page=5#dis-post-562356 Sun, 28 Oct 2018 06:39:48 +0000 https://forums.modx.com/thread/86471/re-step-by-step---how-to-import-excel-data-and-how-to-show-them-on-front-end-page?page=5#dis-post-562356
<![CDATA[MODX modUser rehashing passwords]]> https://forums.modx.com/thread/104468/modx-moduser-rehashing-passwords#dis-post-561948 https://forums.modx.com/thread/104468/modx-moduser-rehashing-passwords#dis-post-561948 Sat, 06 Oct 2018 03:45:39 +0000 https://forums.modx.com/thread/104468/modx-moduser-rehashing-passwords#dis-post-561948 <![CDATA[NEW: Create Classes, Maps & Tables From Dashboard Widget!]]> https://forums.modx.com/thread/104447/new-create-classes-maps-tables-from-dashboard-widget#dis-post-561883
Warning:
I am getting the following errors I have no idea how to debug ATM.

Errors:
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 618) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 661) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 666) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 618) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 621) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 661) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 1264) PHP warning: Illegal offset type
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 618) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 621) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 661) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 1289) Could not get table name for class: UserCommentFlags
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 618) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 621) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 661) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 1840) PHP warning: Illegal offset type
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 618) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 621) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 661) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 1336) PHP warning: Illegal offset type
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 618) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 621) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 661) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 1341) PHP warning: Illegal offset type
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 618) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 621) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 661) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 618) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 621) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 661) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 1438) PHP warning: Illegal offset type
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 618) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 621) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 661) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 1361) PHP warning: Illegal offset type
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 618) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 621) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 661) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 618) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 621) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 661) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 1573) PHP warning: Illegal offset type
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 1584) PHP warning: Illegal offset type
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 618) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 621) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 661) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 618) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 621) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 661) PHP warning: Illegal offset type in isset or empty
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 1594) PHP warning: Illegal offset type
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/xpdo.class.php : 1603) PHP warning: Illegal offset type
[2018-09-28 17:29:34] (ERROR @ core_dev/xpdo/om/mysql/xpdomanager.class.php : 256) Could not create table 
SQL: CREATE TABLE  () ENGINE=InnoDB
ERROR: Array
(
    [0] => 42000
    [1] => 1064
    [2] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '() ENGINE=InnoDB' at line 1
)

[2018-09-28 17:29:34] (ERROR in schemaToDatabase @ /var/www/cannacle/Oxg9v_core_dev/cache/includes/elements/modsnippet/224.include.cache.php : 44) Error: Could not generate Table/s!


The schema file...
<?xml version="1.0" encoding="UTF-8"?>
<model package="Social" baseClass="xPDOObject" platform="mysql" defaultEngine="InnoDB" version="1.1">
	<object class="UserCommentFlags" table="user_comment_flags" extends="xPDOSimpleObject">
		<field key="item_id" dbtype="bigint" precision="20" phptype="integer" null="false" />
		<field key="user_id" dbtype="int" precision="11" phptype="integer" null="false" />
		<field key="reason" dbtype="int" precision="1" phptype="integer" null="false" />
		<field key="created" dbtype="timestamp" phptype="timestamp" null="false" default="CURRENT_TIMESTAMP" />
		<field key="reviewed" dbtype="timestamp" phptype="timestamp" null="true" />
	</object>
	<object class="UserCommentLikes" table="user_comment_likes" extends="xPDOSimpleObject">
		<field key="item_id" dbtype="bigint" precision="20" phptype="integer" null="false" index="unique" />
		<field key="liked_by" dbtype="int" precision="11" phptype="integer" null="false" />
		<field key="liked_on" dbtype="timestamp" phptype="timestamp" null="false" default="CURRENT_TIMESTAMP" />

		<index alias="id" name="id" primary="false" unique="true" type="BTREE" >
			<column key="item_id" length="" collation="A" null="false" />
		</index>
	</object>
	<object class="UserFollowers" table="user_followers" extends="xPDOObject">
		<field key="id" dbtype="int" precision="11" phptype="integer" null="false" index="pk" />
		<field key="list" dbtype="longtext" phptype="string" null="false" />

		<index alias="PRIMARY" name="PRIMARY" primary="true" unique="true" type="BTREE" >
			<column key="id" length="" collation="A" null="false" />
		</index>
	</object>
	<object class="UserGroupAdmins" table="user_group_admins" extends="xPDOSimpleObject">
		<field key="user_id" dbtype="int" precision="11" phptype="integer" null="false" />
		<field key="group_id" dbtype="int" precision="12" phptype="integer" null="false" />
		<field key="moderate" dbtype="int" precision="1" phptype="integer" null="false" default="1" />
		<field key="kick" dbtype="int" precision="1" phptype="integer" null="false" default="1" />
		<field key="ban" dbtype="int" precision="1" phptype="integer" null="false" default="1" />
		<field key="added" dbtype="timestamp" phptype="timestamp" null="false" default="CURRENT_TIMESTAMP" />

		<index alias="id" name="id" primary="false" unique="true" type="BTREE" >
			<column key="id" length="" collation="A" null="false" />
		</index>
	</object>
	<object class="UserGroups" table="user_groups" extends="xPDOSimpleObject">
		<field key="owner_id" dbtype="int" precision="11" phptype="integer" null="false" />
		<field key="name" dbtype="varchar" precision="32" phptype="string" null="false" />
		<field key="descrption" dbtype="int" precision="140" phptype="integer" null="false" />
		<field key="created" dbtype="timestamp" phptype="timestamp" null="false" default="CURRENT_TIMESTAMP" />
		<field key="privacy" dbtype="int" precision="2" phptype="integer" null="false" default="0" />

		<index alias="id" name="id" primary="false" unique="true" type="BTREE" >
			<column key="id" length="" collation="A" null="false" />
		</index>
	</object>
	<object class="UserPostFlags" table="user_post_flags" extends="xPDOSimpleObject">
		<field key="item_id" dbtype="bigint" precision="20" phptype="integer" null="false" />
		<field key="user_id" dbtype="int" precision="11" phptype="integer" null="false" />
		<field key="reason" dbtype="int" precision="1" phptype="integer" null="false" />
		<field key="created" dbtype="timestamp" phptype="timestamp" null="false" default="CURRENT_TIMESTAMP" />
		<field key="reviewed" dbtype="timestamp" phptype="timestamp" null="true" />
	</object>
	<object class="UserPostLikes" table="user_post_likes" extends="xPDOSimpleObject">
		<field key="item_id" dbtype="bigint" precision="20" phptype="integer" null="false" />
		<field key="liked_by" dbtype="int" precision="11" phptype="integer" null="false" />
		<field key="liked_on" dbtype="timestamp" phptype="timestamp" null="false" default="CURRENT_TIMESTAMP" />
	</object>
	<object class="UserPostShares" table="user_post_shares" extends="xPDOSimpleObject">
		<field key="item_id" dbtype="bigint" precision="20" phptype="integer" null="false" />
		<field key="shared_by" dbtype="int" precision="11" phptype="integer" null="false" />
		<field key="shared_on" dbtype="timestamp" phptype="timestamp" null="false" default="CURRENT_TIMESTAMP" />
	</object>
	<object class="UserPosts" table="user_posts" extends="xPDOSimpleObject">
		<field key="owner_id" dbtype="int" precision="11" phptype="integer" null="false" />
		<field key="wall" dbtype="int" precision="11" phptype="integer" null="false" />
		<field key="type" dbtype="varchar" precision="32" phptype="string" null="false" default="wall" />
		<field key="created" dbtype="timestamp" phptype="timestamp" null="false" default="CURRENT_TIMESTAMP" />
		<field key="deleted" dbtype="timestamp" phptype="timestamp" null="true" />
		<field key="content" dbtype="text" phptype="string" null="false" />
		<field key="privacy" dbtype="int" precision="2" phptype="integer" null="false" default="0" />
		<field key="flagged" dbtype="int" precision="11" phptype="integer" null="false" default="0" />
		<field key="liked" dbtype="bigint" precision="20" phptype="integer" null="false" default="0" />

		<index alias="id" name="id" primary="false" unique="true" type="BTREE" >
			<column key="id" length="" collation="A" null="false" />
		</index>
	</object>
	<object class="UserProfileFlags" table="user_profile_flags" extends="xPDOSimpleObject">
		<field key="item_id" dbtype="bigint" precision="20" phptype="integer" null="false" />
		<field key="user_id" dbtype="int" precision="11" phptype="integer" null="false" />
		<field key="reason" dbtype="int" precision="1" phptype="integer" null="false" />
		<field key="created" dbtype="timestamp" phptype="timestamp" null="false" default="CURRENT_TIMESTAMP" />
		<field key="reviewed" dbtype="timestamp" phptype="timestamp" null="true" />
	</object>
	<object class="UserProfileLikes" table="user_profile_likes" extends="xPDOObject">
		<field key="id" dbtype="bigint" precision="20" phptype="integer" null="false" index="pk" />
		<field key="item_id" dbtype="bigint" precision="20" phptype="integer" null="false" />
		<field key="liked_by" dbtype="int" precision="11" phptype="integer" null="false" />
		<field key="liked_on" dbtype="timestamp" phptype="timestamp" null="false" default="CURRENT_TIMESTAMP" />

		<index alias="PRIMARY" name="PRIMARY" primary="true" unique="true" type="BTREE" >
			<column key="id" length="" collation="A" null="false" />
		</index>
	</object>
	<object class="UserReplyFlags" table="user_reply_flags" extends="xPDOSimpleObject">
		<field key="item_id" dbtype="bigint" precision="20" phptype="integer" null="false" />
		<field key="user_id" dbtype="int" precision="11" phptype="integer" null="false" />
		<field key="reason" dbtype="int" precision="1" phptype="integer" null="false" />
		<field key="created" dbtype="timestamp" phptype="timestamp" null="false" default="CURRENT_TIMESTAMP" />
		<field key="reviewed" dbtype="timestamp" phptype="timestamp" null="true" />
	</object>
	<object class="UserReplyLikes" table="user_reply_likes" extends="xPDOSimpleObject">
		<field key="item_id" dbtype="bigint" precision="20" phptype="integer" null="false" index="unique" />
		<field key="liked_by" dbtype="int" precision="11" phptype="integer" null="false" />
		<field key="liked_on" dbtype="timestamp" phptype="timestamp" null="false" default="CURRENT_TIMESTAMP" />

		<index alias="id" name="id" primary="false" unique="true" type="BTREE" >
			<column key="item_id" length="" collation="A" null="false" />
		</index>
	</object>
	<object class="UserStreams" table="user_streams" extends="xPDOObject">
		<field key="owner_id" dbtype="int" precision="11" phptype="integer" null="false" index="pk" />
		<field key="following" dbtype="longtext" phptype="string" null="true" />

		<index alias="PRIMARY" name="PRIMARY" primary="true" unique="true" type="BTREE" >
			<column key="owner_id" length="" collation="A" null="false" />
		</index>
		<index alias="owner_id" name="owner_id" primary="false" unique="true" type="BTREE" >
			<column key="owner_id" length="" collation="A" null="false" />
		</index>
	</object>
	<object class="UserWalls" table="user_walls" extends="xPDOObject">
		<field key="id" dbtype="int" precision="11" phptype="integer" null="false" index="pk" />
		<field key="username" dbtype="varchar" precision="64" phptype="string" null="false" />
		<field key="privacy" dbtype="int" precision="2" phptype="integer" null="false" default="0" />
		<field key="whitelist" dbtype="longtext" phptype="string" null="true" />
		<field key="blacklist" dbtype="mediumtext" phptype="string" null="true" />

		<index alias="PRIMARY" name="PRIMARY" primary="true" unique="true" type="BTREE" >
			<column key="id" length="" collation="A" null="false" />
		</index>
	</object>
</model>


The map file for the UserCommentFlags table...
<?php
$xpdo_meta_map['UserCommentFlags']= array (
  'package' => 'Social',
  'version' => '1.1',
  'table' => 'user_comment_flags',
  'extends' => 'xPDOSimpleObject',
  'tableMeta' => 
  array (
    'engine' => 'InnoDB',
  ),
  'fields' => 
  array (
    'item_id' => NULL,
    'user_id' => NULL,
    'reason' => NULL,
    'created' => 'CURRENT_TIMESTAMP',
    'reviewed' => NULL,
  ),
  'fieldMeta' => 
  array (
    'item_id' => 
    array (
      'dbtype' => 'bigint',
      'precision' => '20',
      'phptype' => 'integer',
      'null' => false,
    ),
    'user_id' => 
    array (
      'dbtype' => 'int',
      'precision' => '11',
      'phptype' => 'integer',
      'null' => false,
    ),
    'reason' => 
    array (
      'dbtype' => 'int',
      'precision' => '1',
      'phptype' => 'integer',
      'null' => false,
    ),
    'created' => 
    array (
      'dbtype' => 'timestamp',
      'phptype' => 'timestamp',
      'null' => false,
      'default' => 'CURRENT_TIMESTAMP',
    ),
    'reviewed' => 
    array (
      'dbtype' => 'timestamp',
      'phptype' => 'timestamp',
      'null' => true,
    ),
  ),
);


Caveats:
Requires FormIt
The error thing mentioned above when tested on 2.6.x-dev merged with...
sdrenth:automate-static-elements running on...
PHP Version 7.0.30-0ubuntu0.16.04.1
mySQL Version 5.7.23-0ubuntu0.16.04.1

Here's the Widget's Chunk...

Name: SchemaToDB
[[FormIt?&hooks=`schemaParser,schemaToDatabase`]]
<p style="padding-bottom:10px;">[[+std.response]]</p>
<form name="stdForm" action="" method="post" class="form">
    <label>Prefix <input type="text" name="stdPrefix" id="stdPrefix" value="[[+std.prefix]]"/></label>
    <label>Package <input type="text" name="stdPackage" id="stdPackage" value="[[+std.package]]"/></label>
    <input type="submit" name="makeItHappen" value="STD It!"/>
</form>


Here are the snippets...

Name: schemaParser
<?php
// Get the perameters passed by FormIt 
$parameters = $hook->getValues();
// Set variables for the passed perameters
$packagename = $parameters['stdPackage'];
// Set the modelpath for addPackage to use later
$modelpath = MODX_CORE_PATH.'components/'.$packagename.'/model/';
// Set the filename of the schema from the package name
$filepath = $modelpath.'schema/'.$packagename.'.mysql.schema.xml';
// Get the manager
$manager = $modx->getManager();
// Get the generator
$generator = $manager->getGenerator();
// Generate or update the class and map files
$result = $generator->parseSchema($filepath,$modelpath);
return $result;


Name: schemaToDatabase
<?php
/* -----------------------------------------------------------------
 * Extension: STD (Schema to Database)
 * -----------------------------------------------------------------
 * Version: 1.0.0
 * Since: September. 26, 2018
 * Author: Aaron Kent <aaron@oneponderosa.com>
 * License: GNU GPLv2 (or later)
 *
 * This will create database table/s for a Single Package
 * based on a schema file.
 *
 * schemaToDatabase
 *
 * @package schemaToDatabase
 * @subpackage schemaToDatabase snippet
 */
// Get the perameters passed by FormIt 
$parameters = $hook->getValues();
// Set variables for the passed perameters
$prefix = $parameters['stdPrefix'];
$packagename = $parameters['stdPackage'];
// Set the modelpath for addPackage to use later
$modelpath = MODX_CORE_PATH.'components/'.$packagename.'/model/';
// Set the filename of the schema from the package name
$filename = $packagename.'.mysql.schema.xml';
// Set the package path for the XML file to object conversion
$packagePath = $modelpath.'schema/'.$filename;
// Set the object
$xmlObj = simplexml_load_string(file_get_contents($packagePath));
// Get the manager
$manager = $modx->getManager();
// Add the package for manager to use
$modx->addPackage($packagename,$modelpath,$prefix);
// Empty the output vriable
$op = '';
    // Iterate through the object created from the schema file
    foreach ($xmlObj->object as $object) {
        // Catch errors that occur with 'if !' check
        if (!$manager->createObjectContainer($object['class'])) {
            // Error control start
            $response = 'Error: Could not generate Table/s!';
            $modx->log(modX::LOG_LEVEL_ERROR, $response, '',
                'schemaToDatabase');
            $modx->setPlaceholders( array(
                'response' => $response,
                'prefix' => $prefix,
                'package' => $packagename,
            ), 'std.' );
            // End error control, and return
            return false;
        } else {
            // Concat the output for display and logging
            $op .= 'created '.$object['table'].' - ';
        }
    }
// Log passing result - for development only, remove in production
$modx->log( modX::LOG_LEVEL_WARN, 'schemaToDatabase '.$op.
    ' tables for package: '.$packagename, '', 'schemaToDatabase' );
// Set passing response
$response = 'STD '.$op.'the table/s for packagename: '.$packagename;
// Set passing placeholders
$modx->setPlaceholders( array(
   'response' => $response.' Package:'.$package,
   'prefix' => $prefix,
   'package' => $packagename,
), 'std.' );
// Return
return true;


The schemaParser is working, but there seems to be a core bug I'm not catching?

You all have no idea how much your ongoing help has meant to mo over these past 4 years. Thank you very much!

Please help me get this fixed so I can move on to final testing and release of the social networking platform.]]>
https://forums.modx.com/thread/104447/new-create-classes-maps-tables-from-dashboard-widget#dis-post-561883 Tue, 02 Oct 2018 08:26:08 +0000 https://forums.modx.com/thread/104447/new-create-classes-maps-tables-from-dashboard-widget#dis-post-561883
<![CDATA[changing the alias for symlink resources]]> https://forums.modx.com/thread/104420/changing-the-alias-for-symlink-resources#dis-post-561657
Is there a way to change the (alias variable) for symlinks resources?

I mean, i created 1 resource(lest call it master), fillrd in the content with text, and then created like 5 copys(symlinks) everywhere in my site(please, forget about SEO implications for having duplicates, i resolved that qith 1 index,follo XD ).

But now i want to change the alias for my "master" resource, but i realized i have to change the alias for those symlinks too?

i believed that changing the alias in the master would replicate to all the symlinks, but sadly, they dont change sad

do i have to change it manually?

Thanks]]>
https://forums.modx.com/thread/104420/changing-the-alias-for-symlink-resources#dis-post-561657 Wed, 19 Sep 2018 07:00:25 +0000 https://forums.modx.com/thread/104420/changing-the-alias-for-symlink-resources#dis-post-561657
<![CDATA[uri_override]]> https://forums.modx.com/thread/104343/uri-override#dis-post-561266
How can i fill the freeze url variable throught a database query?

image below: https://drive.google.com/open?id=1Shjaiy-mDqtM05tS5S9Q8yvLohxCoaA3

i mean, when i click that checkbox and click save button, an INSERT(uri_override = true???) is made for that resource?

thanks]]>
https://forums.modx.com/thread/104343/uri-override#dis-post-561266 Fri, 31 Aug 2018 01:55:38 +0000 https://forums.modx.com/thread/104343/uri-override#dis-post-561266
<![CDATA[How to "shorten" url tree in some sites?]]> https://forums.modx.com/thread/104331/how-to-shorten-url-tree-in-some-sites#dis-post-561210
For example, having a tree like this:

Root
Categories
------subcategories
----------subsubcategories
--------------Article1.html
--------------Article2.html
--------------ArticleETC.html

My url is becoming too long root/Categories/subcategories/subsubcategories/Article1.html so my SEO is gonna suffer

how can i change the url without moving my articles 2 levels less deep? like:
root/Categories/Article1.html

(NOTE: if succeded, i think i have to do redirects because those deep url no longer exists for Google...)

i certainly dont want to move all my articles manually, because in the future, that would be a pain in the 4SS :/

Thanks
]]>
https://forums.modx.com/thread/104331/how-to-shorten-url-tree-in-some-sites#dis-post-561210 Tue, 28 Aug 2018 09:26:38 +0000 https://forums.modx.com/thread/104331/how-to-shorten-url-tree-in-some-sites#dis-post-561210
<![CDATA[How can I insert the ID of the formit forms into each email that is sent?]]> https://forums.modx.com/thread/104316/how-can-i-insert-the-id-of-the-formit-forms-into-each-email-that-is-sent#dis-post-561172
I'm a noob when it comes to PHP. Is this the right way to do it?

[[!FomitID]]


<?php
$output = '';
$sql = "SELECT id FROM modx_formit_forms ORDER BY id DESC LIMIT 1";
foreach ($modx->query($sql) as $row) {
    $output .= $row['id'];
}

print ($output);
]]>
https://forums.modx.com/thread/104316/how-can-i-insert-the-id-of-the-formit-forms-into-each-email-that-is-sent#dis-post-561172 Mon, 27 Aug 2018 10:05:56 +0000 https://forums.modx.com/thread/104316/how-can-i-insert-the-id-of-the-formit-forms-into-each-email-that-is-sent#dis-post-561172
<![CDATA[Could not find action file at: controllers/default/index.php]]> https://forums.modx.com/thread/81571/could-not-find-action-file-at-controllers-default-index-php#dis-post-561027
Today I see this message in the manager while I can see the tree on the left. However When I press on a document nothings happens as well as when I choose anything from the top bar.

Any help would be appreciated

thanks]]>
https://forums.modx.com/thread/81571/could-not-find-action-file-at-controllers-default-index-php#dis-post-561027 Thu, 23 Aug 2018 12:20:36 +0000 https://forums.modx.com/thread/81571/could-not-find-action-file-at-controllers-default-index-php#dis-post-561027