octobercms - 使用所见即所得编辑器的默认布局损坏,“无法加载 Jquery”错误
问题描述
问题发生在我将十月 CMS 配置为从设置中使用所见即所得编辑器时。
默认布局工作正常。但是,当我打开默认布局文件时,所见即所得编辑器(我认为)更改了一些代码,现在我的 CMS 无法加载任何样式。我试图重新创建默认布局文件。但是控制台抛出错误
*framework.js:9 Uncaught Error: The jQuery library is not loaded.
The OctoberCMS framework cannot be initialized.
at framework.js:9*
这意味着 10 月现在无法加载 Jquery。在我自己编辑之后,我的默认布局看起来像这样。
<html>
<head>
<title>{{ this.page.title }}</title>
{% styles %}
{% framework extras %} {% scripts %}
</head>
<body>
{% partial "site/header" %}
{% page %}
{% partial "site/footer" %}
</body>
</html>
我试图将脚本标签移到底部,但没有帮助。默认布局应该能够加载所需的文件。
编辑:
好的,我能够以艰难的方式解决这个问题(重新安装)。实际的布局文件如下所示:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>October CMS - {{ this.page.title }}</title>
<meta name="description" content="{{ this.page.meta_description }}">
<meta name="title" content="{{ this.page.meta_title }}">
<meta name="author" content="OctoberCMS">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="OctoberCMS">
<link rel="icon" type="image/png" href="{{ 'assets/images/october.png'|theme }}">
<link href="{{ 'assets/css/vendor.css'|theme }}" rel="stylesheet">
<link href="{{ 'assets/css/theme.css'|theme }}" rel="stylesheet">
{% styles %}
</head>
<body>
<!-- Header -->
<header id="layout-header">
{% partial 'site/header' %}
</header>
<!-- Content -->
<section id="layout-content">
{% page %}
</section>
<!-- Footer -->
<footer id="layout-footer">
{% partial 'site/footer' %}
</footer>
<!-- Scripts -->
<script src="{{ 'assets/vendor/jquery.js'|theme }}"></script>
<script src="{{ 'assets/vendor/bootstrap.js'|theme }}"></script>
<script src="{{ 'assets/javascript/app.js'|theme }}"></script>
{% framework extras %}
{% scripts %}
</body>
</html>
解决方案
推荐阅读
- python - 制作动画包 - 好的做法?
- c# - 使用 ProcessStartInfo 从现有 C# 应用程序调用 C# 应用程序?
- r - Shiny App R如何仅在退出而不是会话结束时执行代码?
- ruby-on-rails - 尽管在 Rails 6 应用程序中将它们列入白名单,但 ActionText 仍去除 iframe 标记
- java - Spring aop 方面未触发
- python - 有没有一种简单的方法可以在数据框中隔离 YYYY-MM-DD 格式的给定日期间隔?
- xml - 需要一个 XSD 结构来解析 DiffGram 数据
- java - 如何使用 DocuSign 生成的公钥和私钥生成 .jks 文件
- c# - 如何使用我覆盖的比较方法?
- javascript - jQuery 填充字段返回 Vee 验证错误