Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thumbs issue with modx in subdirectory #292

Closed
mkilinskidev opened this issue Nov 9, 2015 · 1 comment
Closed

Thumbs issue with modx in subdirectory #292

mkilinskidev opened this issue Nov 9, 2015 · 1 comment

Comments

@mkilinskidev
Copy link

Hi!

I have a MODX Revolution 2.4.1-pl (traditional) in subdirectory (http://somedomail.com/subdirectory/). Because of that, all thumbs doesn't show correctly. The issue is in the paths to the main directories, but now I can't change them (until to connect the target domain) The generated img src is:

<img src="/_sites/btz.bydgoszcz.pl/assets/components/gallery/connector.php?action=web/phpthumb&amp;ctx=web&amp;w=100&amp;h=100&amp;zc=1&amp;far=C&amp;q=90&amp;src=%2F_sites%2Fbtz.bydgoszcz.pl%2F%2F_sites%2Fbtz.bydgoszcz.pl%2Fassets%2Fgallery%2F3%2F11.jpg">

If I edit above path like that:

<img src="/_sites/btz.bydgoszcz.pl/assets/components/gallery/connector.php?action=web/phpthumb&amp;ctx=web&amp;w=100&amp;h=100&amp;zc=1&amp;far=C&amp;q=90&amp;src=%2Fassets%2Fgallery%2F3%2F11.jpg">

the tumbs works fine. Is there any options to fix this paths?

My config.inc.php:

<?php
/**
 *  MODX Configuration file
 */
$database_type = 'mysql';
$database_server = 'localhost';
$database_user = '****';
$database_password = '****';
$database_connection_charset = 'utf8';
$dbase = '****';
$table_prefix = 'modx_';
$database_dsn = 'mysql:host=localhost;dbname=****;charset=utf8';
$config_options = array (
);
$driver_options = array (
);

$lastInstallTime = ****

$site_id = '****';
$site_sessionname = '****';
$https_port = '443';
$uuid = '****';

if (!defined('MODX_CORE_PATH')) {
    $modx_core_path= '/home/xy207250/public_html/_sites/btz.bydgoszcz.pl/core/';
    define('MODX_CORE_PATH', $modx_core_path);
}
if (!defined('MODX_PROCESSORS_PATH')) {
    $modx_processors_path= '/home/xy207250/public_html/_sites/btz.bydgoszcz.pl/core/model/modx/processors/';
    define('MODX_PROCESSORS_PATH', $modx_processors_path);
}
if (!defined('MODX_CONNECTORS_PATH')) {
    $modx_connectors_path= '/home/xy207250/public_html/_sites/btz.bydgoszcz.pl/connectors/';
    $modx_connectors_url= '/_sites/btz.bydgoszcz.pl/connectors/';
    define('MODX_CONNECTORS_PATH', $modx_connectors_path);
    define('MODX_CONNECTORS_URL', $modx_connectors_url);
}
if (!defined('MODX_MANAGER_PATH')) {
    $modx_manager_path= '/home/xy207250/public_html/_sites/btz.bydgoszcz.pl/manager/';
    $modx_manager_url= '/_sites/btz.bydgoszcz.pl/manager/';
    define('MODX_MANAGER_PATH', $modx_manager_path);
    define('MODX_MANAGER_URL', $modx_manager_url);
}
if (!defined('MODX_BASE_PATH')) {
    $modx_base_path= '/home/xy207250/public_html/_sites/btz.bydgoszcz.pl/';
    $modx_base_url= '/_sites/btz.bydgoszcz.pl/';
    define('MODX_BASE_PATH', $modx_base_path);
    define('MODX_BASE_URL', $modx_base_url);
}
if(defined('PHP_SAPI') && (PHP_SAPI == "cli" || PHP_SAPI == "embed")) {
    $isSecureRequest = false;
} else {
    $isSecureRequest = ((isset ($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || $_SERVER['SERVER_PORT'] == $https_port);
}
if (!defined('MODX_URL_SCHEME')) {
    $url_scheme=  $isSecureRequest ? 'https://' : 'http://';
    define('MODX_URL_SCHEME', $url_scheme);
}
if (!defined('MODX_HTTP_HOST')) {
    if(defined('PHP_SAPI') && (PHP_SAPI == "cli" || PHP_SAPI == "embed")) {
        $http_host='mkilinski.pl';
        define('MODX_HTTP_HOST', $http_host);
    } else {
        $http_host= array_key_exists('HTTP_HOST', $_SERVER) ? $_SERVER['HTTP_HOST'] : 'mkilinski.pl';
        if ($_SERVER['SERVER_PORT'] != 80) {
            $http_host= str_replace(':' . $_SERVER['SERVER_PORT'], '', $http_host); // remove port from HTTP_HOST
        }
        $http_host .= ($_SERVER['SERVER_PORT'] == 80 || $isSecureRequest) ? '' : ':' . $_SERVER['SERVER_PORT'];
        define('MODX_HTTP_HOST', $http_host);
    }
}
if (!defined('MODX_SITE_URL')) {
    $site_url= $url_scheme . $http_host . MODX_BASE_URL;
    define('MODX_SITE_URL', $site_url);
}
if (!defined('MODX_ASSETS_PATH')) {
    $modx_assets_path= '/home/xy207250/public_html/_sites/btz.bydgoszcz.pl/assets/';
    $modx_assets_url= '/_sites/btz.bydgoszcz.pl/assets/';
    define('MODX_ASSETS_PATH', $modx_assets_path);
    define('MODX_ASSETS_URL', $modx_assets_url);
}
if (!defined('MODX_LOG_LEVEL_FATAL')) {
    define('MODX_LOG_LEVEL_FATAL', 0);
    define('MODX_LOG_LEVEL_ERROR', 1);
    define('MODX_LOG_LEVEL_WARN', 2);
    define('MODX_LOG_LEVEL_INFO', 3);
    define('MODX_LOG_LEVEL_DEBUG', 4);
}
if (!defined('MODX_CACHE_DISABLED')) {
    $modx_cache_disabled= false;
    define('MODX_CACHE_DISABLED', $modx_cache_disabled);
}

@florian-rabis
Copy link

It looks like the files_path and files_url entries in the system-settings.
I think you need to change it from
[[++assets_path]]gallery/
to
assets/gallery/

or any other path to your albums/items.

But I would like to know if this is the only issue you have with the thumbnails.
I installed modx 2.4.2 lately and in my case only the thumbnails of the image previews in the manager won't be displayed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants