Revolution 2.3 - MODX Community Forums https://forums.modx.com/board/?board=296 <![CDATA[MODX RESTful API & nginx: access issue]]> https://forums.modx.com/thread/104332/modx-restful-api-nginx-access-issue#dis-post-561196 https://docs.modx.com/revolution/2.x/developing-in-modx/advanced-development/developing-rest-servers

I am hosting this on modx cloud and I keep getting the
{"success":false,"message":"Method not allowed","object":[],"code":405}
error.

My files are in the /rest/ directory at my site root.

rest/index.php:
<?php
// Boot up MODX
require_once dirname(dirname(__FILE__)) . '/config.core.php';
require_once MODX_CORE_PATH . 'model/modx/modx.class.php';
$modx = new modX();
$modx->initialize('web');
$modx->getService('error','error.modError', '', '');

// Load the modRestService class and pass it some basic configuration
$rest = $modx->getService('rest', 'rest.modRestService', '', array(
    'basePath' => dirname(__FILE__) . '/Controllers/',
    'controllerClassSeparator' => '',
    'controllerClassPrefix' => 'MyController',
    'xmlRootNode' => 'response',
));
// Prepare the request
$rest->prepare();
// Make sure the user has the proper permissions, send the user a 401 error if not
if (!$rest->checkPermissions()) {
    $rest->sendUnauthorized(true);
}
// Run the request
$rest->process();


rest/controllers/programs
class MyControllerPrograms extends modRestController {
    public $classKey = 'modResource';
    public $defaultSortField = 'id';
    public $defaultSortDirection = 'DESC';
 
    public function beforePost()
    {
        return false;
    }
 
    public function beforePut()
    {
        return false;
    }
 
    public function beforeDelete()
    {
        return false;
    }
 
}
}



nginx rules
location /rest/ {
    try_files $uri @modx_rest;
}
location @modx_rest {
    rewrite ^/rest/(.*)$ /rest/index.php?_rest=$1&$args last;
}
location / {
    try_files $uri $uri/ @modx-rewrite;
}


Most ideas on the net are around putting an htaccess in the rest directory, but with nginx this isn't relevant.

What could be missing in the above set up? I will be calling this api from a gatsby.js (node.js based) site as a data source.

Thanks]]>
https://forums.modx.com/thread/104332/modx-restful-api-nginx-access-issue#dis-post-561196 Tue, 28 Aug 2018 03:08:48 +0000 https://forums.modx.com/thread/104332/modx-restful-api-nginx-access-issue#dis-post-561196
<![CDATA[Code: 200 OK {"success":false,"message":"Processor not found: getlist","total":0,"data":[],"object":[]}]]> https://forums.modx.com/thread/92423/code-200-ok-success-false-message-processor-not-found-getlist-total-0-data-object#dis-post-560223
Code: 200 OK
{"success":false,"message":"Processor not found: getlist","total":0,"data":[],"object":[]}


every time I select a resource or an element that attempts to build a list. I'm logged in as Administrator and I have all 172 permissions granted to me.

I went into package management, and there were no packages present, just the message:

Processor not found: getlist

I deleted core/cache and this allowed me to see packages, but did not fix the other issues

Looking at the error log, I see many errors. For example:

[2014-07-29 11:21:11] (ERROR @ /connectors/workspace/packages-rest.php) Processor /var/www/hca/core/model/modx/processors/getlist.php does not exist; Array
(
[action] => getlist
)

[2014-07-29 11:21:11] (ERROR @ /connectors/workspace/providers.php) Processor /var/www/hca/core/model/modx/processors/getlist.php does not exist; Array
(
[action] => getlist
)


However, most of the errors are for extenduser, a component I had written before the upgrade to extend Moduser:

[2014-07-29 11:44:59] (ERROR @ /connectors/index.php) Path specified for package extenduser is not a valid or accessible directory: /var/www/hca/core/components/extenduser/model/model/

Note the extra /model directory.

The plugin that uses this was deactivated before clearing out the cache.

I suspect I might have two different issues here, but I can't be sure. The front end of the site is fine, it is just the Manager having issues. Sorry about the amount of detail - I try to be thorough.

Help please!]]>
https://forums.modx.com/thread/92423/code-200-ok-success-false-message-processor-not-found-getlist-total-0-data-object#dis-post-560223 Mon, 30 Jul 2018 02:24:30 +0000 https://forums.modx.com/thread/92423/code-200-ok-success-false-message-processor-not-found-getlist-total-0-data-object#dis-post-560223
<![CDATA[error log is filling more since 2.6]]> https://forums.modx.com/thread/103871/error-log-is-filling-more-since-2-6?page=2#dis-post-559086
I upgraded from 2.56 to 2.5.8 then 2.6 then 2.6.3

I saw my modx error log getting filled by tons of new errors
including large part of the code of the pages whatever they are. And a few page not rendering as they should.

I notice a few clues about output modifers

I changed back optimized syntaxe into old one and this solved those rendering issues
[[!+myDocList:is=``:then=`[[*content]]`:else=`[[$marque-contenu-docs0]]`]]

[[[[-!+myDocList:is=``:
then=`*content`:
else=`$marque-contenu-docs0`]]]]


Regarding the error log after : some extract
 ... [2018-05-18 15:33:49] (ERROR @ /xxxxxxx/httpdocs/core/xpdo/om/xpdoquery.class.php : 764) Encountered empty IN condition with key id
[2018-05-18 15:33:49] (ERROR @ /xxxxxxxx/httpdocs/core/model/modx/modparser.class.php : 540) Could not find snippet with name #1.pagetitle.
[2018-05-18 15:33:49] (ERROR in resource 13 @ /xxxxxxxx/httpdocs/core/model/modx/modparser.class.php : 1373) Bad link tag `[[~]]` encountered
[2018-05-18 15:33:50] (ERROR @ /xxxxxxxxx/httpdocs/core/model/modx/modparser.class.php : 540) Could not find snippet with name #27.tv.footCol1.
[2018-05-18 15:33:50] (ERROR @ /xxxxxxxxxx/httpdocs/core/model/modx/modparser.class.php : 540) Could not find snippet with name #27.tv.footCol2.
[2018-05-18 15:33:50] (ERROR @ /xxxxxxxx/httpdocs/core/model/modx/modparser.class.php : 540) Could not find snippet with name #27.tv.footCol3.
[2018-05-18 15:33:50] (ERROR @ /xxxxxxxx/httpdocs/core/model/modx/modparser.class.php : 540) Could not find snippet with name #41.longtitle.
[2018-05-18 15:33:50] (ERROR @ /xxxxxxxx/httpdocs/core/model/modx/modparser.class.php : 540) Could not find snippet with name #72.longtitle.
[2018-05-18 15:33:50] (ERROR @ /xxxxxxxxx/httpdocs/core/model/modx/modparser.class.php : 540) Could not find snippet with name #74.longtitle.
]]>
https://forums.modx.com/thread/103871/error-log-is-filling-more-since-2-6?page=2#dis-post-559086 Thu, 14 Jun 2018 09:43:21 +0000 https://forums.modx.com/thread/103871/error-log-is-filling-more-since-2-6?page=2#dis-post-559086
<![CDATA[Code: 200 OK {"success":false,"message":"Permission denied!","total":0,"data":[],"object":[]}]]> https://forums.modx.com/thread/92387/code-200-ok-success-false-message-permission-denied-total-0-data-object?page=6#dis-post-558479 Do you agree with me!? 2.3 and even 2.3.1 are not ready at all for GA release, many issues here and there. I've ACL screwed up, and it behaves really weird.

1- Resource which was configured with no save is throwing:
Code: 200 OK
{"success":false,"message":"Permission denied!","total":0,"data":[],"object":[]}

2- Menu items in topnav do not display for non-super user when they have custom permissions.

3- Some menu items with javascript handle causes the manager not to load at all: test with "flush your permissions" JS for example

3- Have to fix some of my code which sometimes hangs only on 2.3.x

Didn't have all those issues on 2.2.14

Bottom line: I suggest a clear straight forward test scenarios to be handled by community members.]]>
https://forums.modx.com/thread/92387/code-200-ok-success-false-message-permission-denied-total-0-data-object?page=6#dis-post-558479 Fri, 11 May 2018 04:36:52 +0000 https://forums.modx.com/thread/92387/code-200-ok-success-false-message-permission-denied-total-0-data-object?page=6#dis-post-558479
<![CDATA[Website Not Displaying Properly]]> https://forums.modx.com/thread/103065/website-not-displaying-properly#dis-post-557760 http://www.skywardltd.com/

According to the client, they were working on the contacts page only adding a new employee before their site went down. But the website looks like there is a larger issue at play, other than just a POSSIBLE messed up HTML page edited from a non-webmaster in the admin resources page tree. I do have all pages, templates and chunks backed up from a year ago.

The error logs have this many times over from 2016-12-28 - 2017-8-14:
/SERVER PATH HERE/xpdo/xpdo.class.php : 3043) SQLSTATE[HY000] [2006] MySQL server has gone away


Yet the front end of the website shows invalid certificate. The backup they have is over a year old, so I want to see if I can remedy this before contacting their hosting company about a possible backup. Where should I look first to see why this website is not showing?]]>
https://forums.modx.com/thread/103065/website-not-displaying-properly#dis-post-557760 Mon, 02 Apr 2018 09:25:40 +0000 https://forums.modx.com/thread/103065/website-not-displaying-properly#dis-post-557760
<![CDATA[Error Code: 200 OK on every resource select. [SOLVED]]]> https://forums.modx.com/thread/92206/error-code-200-ok-on-every-resource-select-solved?page=5#dis-post-555038
Code: 200 OK
{"success":false,"message":"Toegang geweigerd!","total":0,"data":[],"object":[]}


This is the error popup code I get when I select any resource in the tree, whether a document or an article. "Toegang geweigerd!" actually means "Permission denied!" in English, therefore have checked file permissions, but they're all 755 or 644.]]>
https://forums.modx.com/thread/92206/error-code-200-ok-on-every-resource-select-solved?page=5#dis-post-555038 Wed, 08 Nov 2017 09:08:15 +0000 https://forums.modx.com/thread/92206/error-code-200-ok-on-every-resource-select-solved?page=5#dis-post-555038
<![CDATA[Page Content Area not Editable]]> https://forums.modx.com/thread/102969/page-content-area-not-editable#dis-post-554490
I cannot put my cursor in the content area (HTML enabled or not) to add content. Toogle editor checked or not. Under settings I do have TinyMCE set as the editor. For the few pages where my rich text is unchecked, I can edit these few pages.

This was working fine, and I did not make any changes that I am aware of so I don't know why it would all of a sudden give issue. Any ideas?

]]>
https://forums.modx.com/thread/102969/page-content-area-not-editable#dis-post-554490 Fri, 13 Oct 2017 05:57:00 +0000 https://forums.modx.com/thread/102969/page-content-area-not-editable#dis-post-554490
<![CDATA[what is the new field "icon" for templates setup]]> https://forums.modx.com/thread/94728/what-is-the-new-field-icon-for-templates-setup#dis-post-552332
I noticed a new field when setting a template : in french it appears as "icône", right after the description field. it's optional and seams to stand for a "personalized class for alla ressources using this tpl"

Rigght but what's the corresponding tv ?
[[*icon]] (or [[+ ) does not returns anything.

Any informations about it ?

thank you
]]>
https://forums.modx.com/thread/94728/what-is-the-new-field-icon-for-templates-setup#dis-post-552332 Fri, 07 Jul 2017 07:09:26 +0000 https://forums.modx.com/thread/94728/what-is-the-new-field-icon-for-templates-setup#dis-post-552332
<![CDATA[Path error with Asset Manager (Assman) extra following migration]]> https://forums.modx.com/thread/95909/path-error-with-asset-manager-assman-extra-following-migration#dis-post-551584
PHP Fatal error:  Call to a member function getAssets() on a non-object in C:\inetpub\vhosts\domain.com\subdomains\stage\core\components\assman\controllers\PageController.php on line 179


This relates specifically to the Asset Manager extra, line 179 of PageController.php is:

$this->config['PageAssets'] = $PA->getAssets($page_id);


The MODX Error Log contains:

(ERROR @ /manager/Index.php) Path specified for package assman is not a valid or accessible directory: C:inetpubvhostsdomain.comsubdomainsstage/core/components/assman/model/


Clearly there is no path separator, C:inetpubvhostsdomain.comsubdomainsstage should be C:inetpub/vhosts/domain.com/subdomains/stage but I can't figure how the path is generated or why it should fail following migration.

I un-installed and re-installed the Asset Manager Extra but this does not help and none of the assman System Settings appear to be relevant.

Can anyone help with this?]]>
https://forums.modx.com/thread/95909/path-error-with-asset-manager-assman-extra-following-migration#dis-post-551584 Thu, 08 Jun 2017 07:35:30 +0000 https://forums.modx.com/thread/95909/path-error-with-asset-manager-assman-extra-following-migration#dis-post-551584
<![CDATA[Package Manager empty / blank]]> https://forums.modx.com/thread/97205/package-manager-empty-blank?page=2#dis-post-548540
All seems to be working OK, apart from package manager which when I click on it, just has a blank space.


PHP Version 5.4.37
cURL support enabled
cURL Information 7.38.0

I have reinstalled a few times, but still the same issue. Tried on chrome, firefox with the same issue. Any ideas?]]>
https://forums.modx.com/thread/97205/package-manager-empty-blank?page=2#dis-post-548540 Fri, 03 Feb 2017 11:02:25 +0000 https://forums.modx.com/thread/97205/package-manager-empty-blank?page=2#dis-post-548540
<![CDATA[Content of all resources lost in Manager]]> https://forums.modx.com/thread/101364/content-of-all-resources-lost-in-manager#dis-post-546983 I have upgraded all my extras (Babel, TinyMCE etc).
I changed PHP version from PHP5.5 to PHP5.6 - without logging out of Manager first.

Now ALL my resource pages appear to be empty. Under "Settings" the "Parent Directory" is empty.
Reverting to PHP5.5 didn't help.
Clicking "View" however is still showing the page properly.

I'm desperate for hints about what might be broken.]]>
https://forums.modx.com/thread/101364/content-of-all-resources-lost-in-manager#dis-post-546983 Tue, 06 Dec 2016 02:40:10 +0000 https://forums.modx.com/thread/101364/content-of-all-resources-lost-in-manager#dis-post-546983
<![CDATA[Nothing rendered on File Tab within Manager]]> https://forums.modx.com/thread/94714/nothing-rendered-on-file-tab-within-manager?page=2#dis-post-546277
I have not changes any settings. Any ideas??]]>
https://forums.modx.com/thread/94714/nothing-rendered-on-file-tab-within-manager?page=2#dis-post-546277 Tue, 08 Nov 2016 10:32:16 +0000 https://forums.modx.com/thread/94714/nothing-rendered-on-file-tab-within-manager?page=2#dis-post-546277
<![CDATA[2.3.5: Drag n' drop in resource tree]]> https://forums.modx.com/thread/97558/2-3-5-drag-n-drop-in-resource-tree#dis-post-546219
So i was delighted to see 2.3.5 with in the changelog the mentioning of the drag-n-drop fix. Just installed it. But the error is still present. Any ideas?

Already emptied cache folder (deleted all files and subfolders)

System:
- Advanced install
- PHP 5.5.26
- MySQL 5.6.25
- Apache 2.4.12]]>
https://forums.modx.com/thread/97558/2-3-5-drag-n-drop-in-resource-tree#dis-post-546219 Sun, 06 Nov 2016 07:02:51 +0000 https://forums.modx.com/thread/97558/2-3-5-drag-n-drop-in-resource-tree#dis-post-546219
<![CDATA[Security forensics: how to analyse an unexpectedly-changed password?]]> https://forums.modx.com/thread/101055/security-forensics-how-to-analyse-an-unexpectedly-changed-password#dis-post-545749
Today after clearing all cookies and rebooting I couldn't log back in to my duplicate MODX site. I compared the password in the duplicate site database with the password in the live site database and they are different (should be the same).

In the db table modx_users the values for salt were still the same in both sites, and both values for hash_class are hashing.modPBKDF2.

1. I would like to decrypt the new password to see if it is recognisable (i.e. did I change it, or was it malicious). Is it posssible to do this?

2. Is there any log entry anywhere for changing a password in any of the normal ways, so I can see when/how this was done?

3. If malicious, could this have been done direct in phpMyAdmin?


EDIT: I've altered this Q to make it more concise.
]]>
https://forums.modx.com/thread/101055/security-forensics-how-to-analyse-an-unexpectedly-changed-password#dis-post-545749 Sun, 16 Oct 2016 03:32:51 +0000 https://forums.modx.com/thread/101055/security-forensics-how-to-analyse-an-unexpectedly-changed-password#dis-post-545749
<![CDATA[File Manager: Default to List View]]> https://forums.modx.com/thread/97657/file-manager-default-to-list-view#dis-post-545130
Another problem I see is that selecting list view or even navigating to a folder aren't persistent. In other words, why doesn’t it “remember” the last view you were on when you opened the file browser? This is pretty standard behavior for most apps, and pretty annoying when you are using MIGx, for example, and have a ton of files to attach.]]>
https://forums.modx.com/thread/97657/file-manager-default-to-list-view#dis-post-545130 Mon, 19 Sep 2016 02:21:20 +0000 https://forums.modx.com/thread/97657/file-manager-default-to-list-view#dis-post-545130
<![CDATA[mxCalendar problem with events longer than one month]]> https://forums.modx.com/thread/100653/mxcalendar-problem-with-events-longer-than-one-month#dis-post-543812 My event should go from 01.08. to 12.09.
It is only displayed in the frontend from 01.08. to 12.08.
In the backend it looks all right.

What is the problem?

ModX 2.3.1
PHP 5
mxCalendars 1.1.11]]>
https://forums.modx.com/thread/100653/mxcalendar-problem-with-events-longer-than-one-month#dis-post-543812 Wed, 03 Aug 2016 10:58:35 +0000 https://forums.modx.com/thread/100653/mxcalendar-problem-with-events-longer-than-one-month#dis-post-543812
<![CDATA[Vaguely: help. fatal error on upgrade.]]> https://forums.modx.com/thread/100136/vaguely-help-fatal-error-on-upgrade#dis-post-541523 I am getting this error:
Fatal error: Call to undefined method StercSEO::isAllowed() in /home/fireflytheatre/core/cache/includes/elements/modplugin/13.include.cache.php on line 139

after and attempted upgrade.

I've tried to send a ticket in to MODX, and have had no reply for two days. My site has been down for almost a week.

]]>
https://forums.modx.com/thread/100136/vaguely-help-fatal-error-on-upgrade#dis-post-541523 Sat, 14 May 2016 06:26:53 +0000 https://forums.modx.com/thread/100136/vaguely-help-fatal-error-on-upgrade#dis-post-541523
<![CDATA[How to get FormItCountryOptions list in other language]]> https://forums.modx.com/thread/94720/how-to-get-formitcountryoptions-list-in-other-language#dis-post-540219 https://forums.modx.com/thread/94720/how-to-get-formitcountryoptions-list-in-other-language#dis-post-540219 Thu, 07 Apr 2016 05:36:43 +0000 https://forums.modx.com/thread/94720/how-to-get-formitcountryoptions-list-in-other-language#dis-post-540219 <![CDATA[Upgrade from 2.3.5 to 2.4.3]]> https://forums.modx.com/thread/99882/upgrade-from-2-3-5-to-2-4-3#dis-post-540183
I'm trying to upgrade a site from 2.3.5 to 2.4.3 but have run into a problem.

I originally tried to make the leap directly but came up against some table errors when the install was trying to finish. So did some reading here and it seemed that 2.3.6 added some bits to the DB. So I then tried to install the traditional version of 2.3.6 downloaded from the ModX site which completed but on logging back into the admin panel it was still on version 2.3.5 and hadn't updated at all.

I then tried BobRay's upgrade extra (which confirmed I was still on 2.3.5) if I click any of the versions to upgrade to it downloads the modx.zip file but it has no content and the upgrade screen is just blank.

Any ideas where the problem may lie?
It's a Linux server running Plesk, PHP 5.4 and MYSQL 5.5.

Let me know if any more info would be useful and thanks in advance.]]>
https://forums.modx.com/thread/99882/upgrade-from-2-3-5-to-2-4-3#dis-post-540183 Tue, 05 Apr 2016 03:12:42 +0000 https://forums.modx.com/thread/99882/upgrade-from-2-3-5-to-2-4-3#dis-post-540183
<![CDATA[Weird CKEditor Error/Bug: Double or Single Quotes converted to « » in the content area.]]> https://forums.modx.com/thread/95492/weird-ckeditor-error-bug-double-or-single-quotes-converted-to-in-the-content-area#dis-post-539267
The whole reason we're using CKeditor instead of TinyMCE is because we wanted to hide the view source button from the publishers. So my questions are these...

1. Has anyone encountered and fixed the « » issue?
2. Is there a way to hide the view source toggle in TinyMCE in order for us to switch away from CKEditor?

Thank you for any help.]]>
https://forums.modx.com/thread/95492/weird-ckeditor-error-bug-double-or-single-quotes-converted-to-in-the-content-area#dis-post-539267 Sun, 06 Mar 2016 07:58:32 +0000 https://forums.modx.com/thread/95492/weird-ckeditor-error-bug-double-or-single-quotes-converted-to-in-the-content-area#dis-post-539267