我们有一个官方公司网站。当我们检查页面速度时,该网站排名较低,并在“减少未使用的 JavaScript”中显示 Google 跟踪代码管理器脚本。由于谷歌标签管理器对网站很重要,有什么方法可以解决这个问题吗?“defer”属性不适用于该脚本。
我正在尝试使用 Docker 将 Craft CMS 部署到zeit/now。它在本地工作,但 zeit 的图像大小限制为100MB
. 我的容器目前是176MB
.
它是一个 Docker 镜像alpine
,使用 Craft 所需的nginx
和php
模块,并使用多阶段构建来构建 Composer 组件,以减少构建工件的大小。
这是Dockerfile
:
FROM zeit/wait-for:0.2 as wait\n\n# Build dependencies\nFROM composer:latest as vendor\n\nCOPY composer.json composer.json\nCOPY composer.lock composer.lock\n\nRUN composer install --ignore-platform-reqs --no-interaction --no-plugins --no-scripts --prefer-dist --no-dev\n\nFROM alpine:3.8\n\nLABEL maintainer="Eivind Mikael Lindbr\xc3\xa5ten <eivindml@icloud.com>"\nLABEL description="Minimal Craft CMS Container using nginx."\n\n# install nginx, php, and php extensions for Craft\nRUN apk add --no-cache \\\n bash \\\n …
Run Code Online (Sandbox Code Playgroud) 我正在使用 CraftCMS,但收到此错误:
\nInvalid Configuration \xe2\x80\x93 yii\\base\\InvalidConfigException\ncraft\\web\\Request::cookieValidationKey must be configured with a secret key.\n
Run Code Online (Sandbox Code Playgroud)\n较长的错误是:
\n1. in /code/vendor/yiisoft/yii2/web/Request.phpat line 1678\n1669167016711672167316741675167616771678167916801681168216831684168516861687 * Converts `$_COOKIE` into an array of [[Cookie]].\n * @return array the cookies obtained from request\n * @throws InvalidConfigException if [[cookieValidationKey]] is not set when [[enableCookieValidation]] is true\n */\n protected function loadCookies()\n {\n $cookies = [];\n if ($this->enableCookieValidation) {\n if ($this->cookieValidationKey == '') {\n throw new InvalidConfigException(get_class($this) . '::cookieValidationKey must be configured with a secret key.');\n }\n foreach …
Run Code Online (Sandbox Code Playgroud) 我已经通过 Composer 安装了 Craft CMS 3,在 MAMP(Windows 10)上运行,并成功创建了一些模板和条目。
但是,当我尝试访问插件商店时,我在页面上看到以下错误:“插件商店不可用,请稍后再试。” 在控制台中,我看到下面复制的两个内部服务器错误:
我能够通过作曲家安装联系表单插件。但不适用于其他插件(例如发芽形式)
我还在仪表板上看到“未知错误”消息: jquery.js:9566 POST http://localhost:81/index.php?p=admin/actions/dashboard/get-feed-items 500(内部服务器错误)
还有其他人看到这个问题吗?
尝试访问插件商店时控制台错误消息:
axios.js:853 GET http://localhost:81/index.php?p=admin/actions/plugin-store/plugin-store-data 500 (Internal Server Error)
(anonymous) @ axios.js:853
e.exports @ axios.js:687
e.exports @ axios.js:1367
Promise.then (async)
a.request @ axios.js:525
a.(anonymous function) @ axios.js:535
(anonymous) @ axios.js:439
Q @ main.js:1
(anonymous) @ main.js:1
getPluginStoreData @ main.js:1
(anonymous) @ vuex.js:710
l.dispatch @ vuex.js:432
dispatch @ vuex.js:338
created @ main.js:1
yt @ vue.min.js:6
pn._init @ vue.min.js:6
pn @ vue.min.js:6
(anonymous) @ main.js:1
l …
Run Code Online (Sandbox Code Playgroud) craftcms ×4
php ×2
alpine-linux ×1
dashboard ×1
docker ×1
nginx ×1
pagespeed ×1
performance ×1
web ×1