Lost resource tree under /manager. MODX Revolution 2.2.5-pl (advanced).
Log in to the admin panel is obtained, but the admin is only the top toolbar.
In the core/cache/logs/error.log:
[2013-03-21 11:18:22] (ERROR # /index.php) `` is not a valid integer and may not be passed to makeUrl()
Ie there is no error on the part of a PHP /manager/index.php.
Firebug after login shows:
ReferenceError: _ is not defined
...rer:this.renderNoteCell.createDelegate(this)]});this.grid_panel=new Ext.grid.Gri...
modx.t...tory.js (строка 806)
ReferenceError: _ is not defined
params[this.paramNames.topic] = '/ys/user-' + MODx.user.id + '/';
modx.js (строка 820)
TypeError: MODx.user is undefined
params[this.paramNames.topic] = '/ys/user-' + MODx.user.id + '/';
modx.js (строка 820)
Chrome shows:
Failed to load resource: the server responded with a status of 401 (Not Authorized)
http://example.com/connectors/lang.js.php?
ctx=mgr&topic=topmenu,file,resource,setting,gallery:default&action=70
Uncaught ReferenceError: _ is not defined modx.tree.directory.js:806
Uncaught ReferenceError: _ is not defined modx.localization.js:5
Uncaught TypeError: Cannot read property 'id' of undefined modx.js:820
Error found on this material, all the writing that the matter compress_js and compress_css.
I adjusted the values from 1 to 0 (Table modx_system_settings). Deleted cache. I go to the admin panel - nothing has changed. In the cache now:
core/cache/system_settings/config.cache.php
'compress_css' => '0',
'compress_js' => '0',
Why Chrome is responsible Not Authorized not clear, as if I logged, but MODx does not understand.
I do not understand what the problem is.
You've done an advanced install and moved one or both the manager and core directories?
First, double check all the paths in core/config, the 2 config.core.php in your site root & manager directories, review all this: http://rtfm.modx.com/display/revolution20/Hardening+MODX+Revolution
if you have moved the core out of above the web root, check your php settings & make sure php can read/write to those directories I had to implicitly add the path to the core's parent directory in my php config. [I was getting the same error as you]
Also, js & css compression hasn't been a problem for a while. 2.2.1 I think.
I had almost the same issue. Please double-check all the config files, especially config paths. My task was domain transfering from web to localhost. There are two imoprtant cases - firstly, check paths(especially pay attention on the slashes, under Windows you have different ones, btw you can / and \ at the same times, it depends). Secondly, there are some troubles with suhosin extension but this wasn't my case. Hope it helps.
Related
With some Uploads in Moodle (3.9) Uploads are not successful, mainly pdf.
The message that comes up is: "An error occured whilst communicating with the server".
not successful requests show
POST /course/dndupload.php undefined
successful requests show
POST /course/dndupload.php HTTP/1.1
When a pdf is reexported with libre office for example the same pdf can be uploaded without problems.
any ideas?
Is the LibreOffice pdf smaller? It could be PHP timing out.
https://docs.moodle.org/311/en/File_upload_size#Modifying_the_php.ini_file
What is the value for max_execution_time ? You can check the PHP values here -
Site administration > Server > PHP info
Also, try switching debug to developer level and see what the error message is.
Site administration > Development > Debugging
Debug messages = Developer
Display debug messages = checked
Although be cautious changing the debug level if its a production site. If you have access to the config.php file then you can specify a user.
// You can specify a comma separated list of user ids that that always see
// debug messages, this overrides the debug flag in $CFG->debug and $CFG->debugdisplay
// for these users only.
// $CFG->debugusers = '2';
Thanks for the response, in the meantime a solution to the problem was found. On the server a measurement against log4j2-vulnerability has been implemented: https://support.f5.com/csp/article/K59329043#proc2. This caused the misbehaviour, the iRule has been removed, now it works again.
A client asked me to install an SSL cert on her site (Krystal.co.uk CPanel hosting, OpenCart 1.5.6.1 website). I installed cert and edited htaccess file to force https, but encountered various content errors, so removed cert and removed edits to htaccess file.
Today I tried the solution provided in
https://isenselabs.com/posts/opencart-pages-https
But got errors - so I removed the certificate again, undid my edits, and now I'm getting the following errors:
Notice: Undefined index: token in /home/bluebir1/public_html/admin/controller/error/not_found.php on line 16Notice: Undefined index: token in /home/bluebir1/public_html/admin/controller/error/not_found.php on line 22
Fatal error: Call to a member function isLogged() on null in /home/bluebir1/public_html/admin/controller/common/header.php on line 122
I can access the OpenCart admin panel and login, but unsure what to do next.
This is happening in all browsers, tried reverting my edits but still getting errors. Tried this solution,
https://forum.opencart.com/viewtopic.php?t=199568
but there were no instances of user_token in the file.
Please share the code in which you are getting the error.
Also, undefined index means the variable you are trying to use (token) is not defined before. So you could make use isset() function to check whether the variable is set or not.
I got the following error in my Vue SPA:
Refused to execute inline script because it violates the following Content Security
Policy directive: "default-src 'self'". Either the 'unsafe-inline' keyword,
a hash ('sha256-KpHv3zgivMSB4dPnfYfqMt2lBibsYvM36EdoBBAsfbM='), or a nonce ('nonce-...')
is required to enable inline execution. Note also that 'script-src' was not explicitly set,
so 'default-src' is used as a fallback.
This error caused by Browsersync:
First, this error occurs only if browser has been reloaded by browsersync in non-root route. For example, this error occurs in http://localhost:3001/sign-in, but never occurs in http://localhost:3001.
Next, this error occurs only in SPA, but never occurs in normal website (multiple pages, no manipulations with HTML5 history). So, I suppose, vue-router is involved.
My hypothesis about the cause is the BrowserSync was wrong. The cause is my past incomprehension how front-end routing works. Let's see what's going on in history mode of vue-router:
Once building complete, new tab in browser with route "/" will open.
Vue-router generates the routes including /sign-in.
When we go to non-root page, e. g. to http://localhost:3000/sign-in
If we make corrections in code, the project will be re-built.
Browser-sync will reload the page http://localhost:3000/sign-in. But Browser Sync does not know what he must to return for http://localhost:3000/sign-in route! It's the static server, it knows only http://localhost:3000/ and can return files relative to directory respective to http://localhost:3000. There is no file sign-in, so it error will occur.
This routes like sign-in has been created by vue-router in http://localhost:3000/ page during routing initialization, but this data will be lost on next browser reloading.
Solutions
I am sure that more than 10 approaches exists (for various project building tools), but I am satisfied with hash mode on local development mode. To enable the history mode on production and/or testing mode, the appropriate server setup required. Most likely it's possible to setup the Browser Sync to redirect like http://localhost:3000/sign_in => http://localhost:3000/.
I don't use the tools like create-vue-app, but I suppose the Webpack pre-setted somehow to avoid above issue (Webpack hot module replacement?).
I am new to coding. I am trying to create a project in october cms.
My question is regarding the error handling. The errors seem to be too informative, and telling about the file name.
For example
error example
I just want to show the error and not the file. How can this be achieved. So users won't be able to see the file names.
In order to achieve this you need to set debug inside config/app.php to false. This will render a generic page when either a 404 or 500 is hit.
These templates can then be overridden by creating a /500 (server error) and /404 (page not found) in the CMS.
From the docs:
Debug mode
The debug setting is found in the config/app.php configuration file with the debug parameter and is enabled by default.
When enabled, this setting will show detailed error messages when they occur along with other debugging features. While useful during development, debug mode should always be disabled when used in a live production site. This prevents potentially sensitive information from being displayed to the end-user.
The debug mode uses the following features when enabled:
Detailed error pages are displayed.
Failed user authentication provides a specific reason.
Combined assets are not minified by default.
Safe mode is disabled by default.
Important: Always set the app.debug setting to false for production environments.
Source: https://octobercms.com/docs/setup/configuration#debug-mode
i have the following simple script to list the ftp accounts
but i am unable to get it to work as i have the following error as soon as it tries to call the constructor
include '/usr/local/cpanel/php/cpanel.php';
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
// List FTP account information.
$list_ftp_accts = $cpanel->uapi('Ftp', 'list_ftp');
echo "<pre>";
print_r($list_ftp_accts);
Fatal error: Uncaught exception 'RuntimeException' with message 'There
was a problem fetching the env variable containing the path to the
socket' in /usr/local/cpanel/php/cpanel.php:146 Stack trace: #0
/public_html/uapi.php(4): CPANEL->__construct() #1
{main} thrown in /usr/local/cpanel/php/cpanel.php on line 146
Line 146 in cpanel.php
$socketfile = getenv('CPANEL_PHPCONNECT_SOCKET');
According to a post on the cPanel forums, you can only use LiveAPI from within cPanel's document root, meaning your code would need to be in either /usr/local/cpanel/base/frontend/ or /usr/local/cpanel/base/3rdparty/. I ran into this while trying to use it in a WHM plugin (which would reside in /usr/local/cpanel/whostmgr/docroot/), and apparently that causes the same problem. If you're trying to run this from within cPanel or WHM, this page has some debugging steps you can try walking through.
If you're trying to run this code on a different server or from within a normal website's hosting account, you'll definitely need to use a different interface, such as the XML or JSON API. These are unfortunately somewhat confusingly documented, but the Guide to WHM API 1 page should get you started.
Me too got the same error.
Try changing your file extension to your_file.live.php, instead of your_file.php. It solved the issue for me.
Referred the documentation here.