简体   繁体   English

无法加载OpenCart Journal2管理面板

[英]OpenCart Journal2 admin panel not loads

After changing from HTTP to HTTPS in my OpenCart installation with Journal2 theme/plugin I have problem - admin panel for Journal2 not loads, showing "Loading..." state and that's all. 在使用Journal2主题/插件从OpenCart安装中将HTTP更改为HTTPS之后,我遇到了问题-Journal2的管理面板未加载,显示“正在加载...”状态,仅此而已。

Journal2 version = 2.13
OpenCart version = 2.3.0.2
Current stack: PHP 7 + Apache2 + MySQL

Also adding screenshot. 还添加了屏幕截图。

What is broken? 什么坏了? I have updated website url from http:// to https:// in admin panel, also updated variables in 我已在管理面板中将网站网址从http://更新为https://,也将

config.php 

and

/admin/config.php 

files. 文件。 Maybe problems with caching? 缓存问题?

在此处输入图片说明

Kindly check the two config files for correct configuration of Data Base and file folders. 请检查两个配置文件,以正确配置数据库和文件夹。

Also u need to check the file in system/library/url.php 您还需要检查system / library / url.php中的文件

on that, 在那上面

public function link($route, $args = '', $secure = false) {
    if ($this->ssl && $secure) {
        $url = 'https://' . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['SCRIPT_NAME']), '/.\\') . '/index.php?route=' . $route;
    } else {
        $url = 'http://' . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['SCRIPT_NAME']), '/.\\') . '/index.php?route=' . $route;
    }

    if ($args) {
        if (is_array($args)) {
            $url .= '&' . http_build_query($args);
        } else {
            $url .= str_replace('&', '&', '&' . ltrim($args, '&'));
        }
    }

    foreach ($this->rewrite as $rewrite) {
        $url = $rewrite->rewrite($url);
    }

    return $url;
}

Hope It will helps you. 希望对您有帮助。

Did you properly configure your site for SSL use? 您是否正确配置了站点以供SSL使用? Let's go over some things here: 让我们来看看这里的一些事情:

  1. Not to sound repetitive, but are you very sure that both your config files are correct? 听起来并不重复,但是您确定两个配置文件都正确吗? Not sure what you meant before when you said you took "the path for the root" from some page when it's pretty much the url that anyone's going to go visit your site/store. 当您说您从某个页面获取“ root的路径”时,并不确定它的含义,而这几乎是任何人都将访问您的站点/商店的URL。 I'm assuming your store/opencart is in it's own folder and not in the root directory, yes? 我假设您的store / opencart在它自己的文件夹中,而不在根目录中,是吗? If so: 如果是这样的话:

admin/config.php file should have something like this: admin / config.php文件应具有以下内容:

// HTTP
define('HTTP_SERVER', 'http://www.yourwebsite.com/opencart/admin/');
define('HTTP_CATALOG', 'http://www.yourwebsite.com/opencart/');

// HTTPS
define('HTTPS_SERVER', 'https://www.yourwebsite.com/opencart/admin/');
define('HTTPS_CATALOG', 'https://www.yourwebsite.com/opencart/');

config.php file should have something like this: config.php文件应具有以下内容:

// HTTP
define('HTTP_SERVER', 'http://www.yourwebsite.com/opencart/');

// HTTPS
define('HTTPS_SERVER', 'https://www.yourwebsite.com/opencart/');

and by what I recall from past experience that forward slash matters at the end. 根据我过去的经验,最后的斜线很重要。

  1. Also, it matters very much if your url is: yourwebsite.com vs www.yourwebsite.com just to point out that, too. 同样,如果您的URL是非常重要的:yourwebsite.com与www.yourwebsite.com只是为了指出这一点。

  2. Speaking of which... how about your .htaccess file? 说到哪个... .htaccess文件呢? That could be a culprit here, too. 这也可能是罪魁祸首。 I'm referring to the htaccess file for your root directory and not opencart's htaccess. 我指的是您的根目录的htaccess文件,而不是opencart的htaccess。 That may need to be altered correctly to for https. 可能需要正确更改为https。 As an example: 举个例子:

 Options +FollowSymlinks RewriteEngine on RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.yourwebsite.com/$1 [R,L] RewriteCond %{HTTP_HOST} ^(www.)?yourwebsite.com$ RewriteCond %{REQUEST_URI} !^/opencart/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /opencart/$1 RewriteCond %{HTTP_HOST} ^(www.)?yourwebsite.com$ RewriteRule ^(/)?$ opencart/index.php [L] 

If you notice here, you need to include the server port and https. 如果您在此处注意到,则需要包括服务器端口和https。 So maybe check that, too. 所以也许也检查一下。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM