图像未显示在 drupal 测试站点上

发布于 2024-12-08 18:19:24 字数 187 浏览 0 评论 0原文

我已成功安装 CKeditor 并尝试链接一些图像。经过多次错误后,我得到了正确的路径,但保存后页面仍然显示为空白,当返回管理基本页面时,图像不再存在,也不再有损坏的图像链接...?我将图像文件放在 files 文件夹内的 images 文件夹中。我确实注意到,当正确链接时,图像会显示在 wsiwyg 编辑器中,但仍然没有运气。

感谢您的帮助

I have successfully installed CKeditor and am attempting to link some images. After many errors I got the path right but once saved the page still ends up blank and when going back to administer the basic page the image is no longer there nor a broken image link...? I put the image file in an images folder inside the files folder. I did notice that the image shows up in the wsiwyg editor when properly linked but still no luck.

Thanks for the help

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

鯉魚旗 2024-12-15 18:19:24

如果您的 drupal 安装在子文件夹中(例如 http://localhost/drupal/),那么图像将不会'无法工作,因为它们引用根 (/),实际上是 localhost (即不是图像所在的位置)。

要修复此问题,请编辑 sites/default/settings.php,取消注释 $base_url = 语句并将其更改为例如。 $base_url = 'http://localhost/drupal/';

If your drupal installation is in a subfolder (eg. http://localhost/drupal/) then the images won't work as they reference the root (/), which is in fact localhost (i.e. not where the images are).

To fix it, edit sites/default/settings.php, uncomment the $base_url = statement and change it to eg. $base_url = 'http://localhost/drupal/';

怪异←思 2024-12-15 18:19:24

另外,请检查您用于创建内容的文本格式。某些文本格式会过滤某些 HTML 标记,导致它们不显示。这可能会为您提供更多信息: http://www.lullabot.com/文章/drupal-输入格式和过滤器

Also, check the Text Format you're using to create your content. Some Text Formats filter certain HTML tags causing them to not show up. This might give you more info: http://www.lullabot.com/articles/drupal-input-formats-and-filters

等数载,海棠开 2024-12-15 18:19:24

我也有同样的问题。我使用的图像的 URL 是另一个网站的绝对 URL,图像将显示在编辑器中,但不会显示在最终帖子中。

对我来说,问题是“文本格式”设置为“过滤的 HTML”而不是“完整的 HTML”。据我了解,“过滤的 HTML”不允许使用某些 HTML 标签。

注意:必须设置权限才能使用“完整 HTML”选项。不过,默认情况下管理员应该能够使用它。

Drupal 站点上有一个关于文本格式的页面:
http://drupal.org/node/213156

根据该页面,不允许的标签应该已被转义(显示为 HTML)。虽然,对我来说,它们被删除了。另外,我检查了“配置 > 内容创作 > 文本格式”部分,对于 Drupal 7,似乎可以使用 IMG 标签,但 IMG 标签中可用的字符数有限制。

我知道这个回复已经很晚了,但它可能会对其他遇到此问题的人有所帮助。

I had the same problem. The URL for the image that I was using was an absolute URL for another web site and the image would show up in the editor, but not in the final post.

The problem for me was that the "Text Format" was set to "Filtered HTML" instead of "Full HTML". From what I understand, "Filtered HTML" disallows the use of certain HTML tags.

NOTE: Permissions have to be set to use the "Full HTML" option. Although, an Administrator should be able to use it by default.

There is a page about the text formatting on the Drupal site:
http://drupal.org/node/213156

According to the page, disallowed tags should have been escaped (shown as HTML). Although, for me, they were removed. Also, I checked the "Configuration > Content authoring > Text formats" section and, for Drupal 7, it appears that IMG tags can be used, but there is a limit on how many characters are usable in an IMG tag.

I know this response is quite late, but it might be of help to other people having this problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文