Magento 2 主题硬编码 google 映射 api url's
Magento 2 Theme hardcoded google maps api url's
我正在配置 magento 2.1.7 部署,使用带 php 的 IIS。
我运行正在使用 TemplateMonster (Theme)
的主题
我已经通过 SSL 将我的商店配置为 运行,但是我收到混合内容警告,因为有一些 JS 脚本正在尝试加载 google 地图 api通过 http 参考。这发生在商店的所有页面上。这些页面是动态创建的,因此我无法追踪代码是从哪里注入的。
我这辈子都找不到它在模板或 magento 源代码中的实现位置。我已经搜索了所有内容块和页面,但就是找不到。我的 magento 主题技能是 0,所以我不知道主题开发人员会在哪里添加混合到每个呈现页面中的代码。
我的警告:
Mixed Content: The page at '***.html' was loaded over HTTPS, but requested an insecure script 'http://maps.googleapis.com/maps/api/js?sensor=true&callback=initialize'. This content should also be served over HTTPS.
来源被报告为页面不存在(动态生成)
这是导致我出现问题的代码块,我就是找不到它!
function loadScript() {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "http://maps.googleapis.com/maps/api/js?sensor=true&callback=initialize";
document.body.appendChild(script);
}
有什么想法吗?
根据@sakura Kinomoto 的上述建议,我使用工具 findstr
找到了包含我要查找的文本的文件。
有问题的文件是:
wwwroot\app\code\TemplateMonster\GoogleMap\view\frontend\templates\init.phtml
我正在配置 magento 2.1.7 部署,使用带 php 的 IIS。
我运行正在使用 TemplateMonster (Theme)
的主题我已经通过 SSL 将我的商店配置为 运行,但是我收到混合内容警告,因为有一些 JS 脚本正在尝试加载 google 地图 api通过 http 参考。这发生在商店的所有页面上。这些页面是动态创建的,因此我无法追踪代码是从哪里注入的。
我这辈子都找不到它在模板或 magento 源代码中的实现位置。我已经搜索了所有内容块和页面,但就是找不到。我的 magento 主题技能是 0,所以我不知道主题开发人员会在哪里添加混合到每个呈现页面中的代码。
我的警告:
Mixed Content: The page at '***.html' was loaded over HTTPS, but requested an insecure script 'http://maps.googleapis.com/maps/api/js?sensor=true&callback=initialize'. This content should also be served over HTTPS.
来源被报告为页面不存在(动态生成)
这是导致我出现问题的代码块,我就是找不到它!
function loadScript() {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "http://maps.googleapis.com/maps/api/js?sensor=true&callback=initialize";
document.body.appendChild(script);
}
有什么想法吗?
根据@sakura Kinomoto 的上述建议,我使用工具 findstr
找到了包含我要查找的文本的文件。
有问题的文件是:
wwwroot\app\code\TemplateMonster\GoogleMap\view\frontend\templates\init.phtml