简体   繁体   English

Mamp Pro 在 Firefox 中呈现没有 styles 但在其他浏览器中正确呈现

[英]Mamp Pro renders without styles in Firefox but correctly in other browsers

for years I've used Mamp (free), but now I pretend to buy pro version, so I've recently installed demo of Mamp Pro and made a few sites work, however, there is one Drupal 9 site that works fine in most browsers, except in Firefox. It renders a non-styled page.多年来我一直使用 Mamp(免费),但现在我假装购买专业版,所以我最近安装了 Mamp Pro 的演示版并使一些网站正常工作,但是,有一个 Drupal 9 网站在大多数情况下都运行良好浏览器,Firefox 除外。它呈现无样式的页面。 It was fine when I used Mamp (free).当我使用 Mamp(免费)时很好。

What I have tried is to inspect page source of Firefox and compared it to the page source of Chrome, the result of this was that the HTML code is the same in both, and that there are not bad closed HTML tags.我尝试的是检查 Firefox 的页面源并将其与 Chrome 的页面源进行比较,结果是 HTML 代码在两者中是相同的,并且有不错的关闭 HTML 标签。

Any idea of what is happening?知道发生了什么吗?

  • Mamp Pro 6.6.4. Mamp Pro 6.6.4。
  • Drupal 9.4.9 Drupal 9.4.9
  • Firefox 108.0.1 (64-bit) Firefox 108.0.1(64 位)
  • PHP max_execution_time = 30 PHP max_execution_time = 30
  • PHP memory_limit = -1 PHP 内存限制 = -1
  • PHP max_input_time = -1 PHP 最大输入时间 = -1

Mamp settings地图设置地图设置

Apache Apache

阿帕奇

Firefox screenshot Firefox 截图

火狐截图

I don't believe this is related to your MAMP version but to the site not being able to load all CSS/JS files If you inspect the the page, and go to the .network' tab, you will see if the CSS & JS files were loaded or not found.我不认为这与您的 MAMP 版本有关,而是与无法加载所有 CSS/JS 文件的网站有关文件已加载或未找到。

If the case is that there were not found, try this:如果情况是没有找到,试试这个:

a) access the Drupal's "Performance" page: /admin/config/development/performance a) 访问Drupal的“性能”页面:/admin/config/development/performance

b) Under 'Bandwidth Optimization' deselect: b) 在“带宽优化”下取消选择:

  1. aggregate CSS files聚合 CSS 个文件
  2. aggregate JS files聚合 JS 文件

'Save Configuration' '保存配置'

c) clear cache c) 清除缓存

You may then select to aggregate the files back然后您可以 select 将文件聚合回来

=== ===

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

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