【问题标题】:After upgrade 2.5 to joomla 3.5 custom plugin doesn't work将 2.5 升级到 joomla 3.5 后自定义插件不起作用
【发布时间】:2018-02-20 16:42:49
【问题描述】:

我的调试堆栈说: 未找到 JHtml 图像。

调用栈

功能位置

1 JApplicationCms->execute() C:\xampp\htdocs\test\index.php:49 2 JApplicationSite->doExecute() C:\xampp\htdocs\test\libraries\cms\application\cms.php:257 3 JApplicationSite->dispatch() C:\xampp\htdocs\test\libraries\cms\application\site.php:230 4 JComponentHelper::renderComponent() C:\xampp\htdocs\test\libraries\cms\application\site.php:191 5 JComponentHelper::executeComponent() C:\xampp\htdocs\test\libraries\cms\component\helper.php:380 6 require_once() C:\xampp\htdocs\test\libraries\cms\component\helper.php:405 7 JControllerLegacy->execute() C:\xampp\htdocs\test\components\com_incidentmap\incidentmap.php:131 8 IncidentController->display() C:\xampp\htdocs\test\libraries\legacy\controller\legacy.php:728 9 JControllerLegacy->display() C:\xampp\htdocs\test\components\com_incidentmap\controller.php:31 10 IncidentViewFlorida->display() C:\xampp\htdocs\test\libraries\legacy\controller\legacy.php:690 11 JViewLegacy->display() C:\xampp\htdocs\test\components\com_incidentmap\views\florida\view.html.php:31 12 JViewLegacy->loadTemplate() C:\xampp\htdocs\test\libraries\legacy\view\legacy.php:209 13 包含() C:\xampp\htdocs\test\libraries\legacy\view\legacy.php:670 14 JHtml::_() C:\xampp\htdocs\test\components\com_incidentmap\views\florida\tmpl\default.php:8

请帮我解决这个问题

【问题讨论】:

  • 你的插件代码在哪里?

标签: joomla upgrade


【解决方案1】:

将有问题的代码替换为:

JHtml::image($file, $alt, $attribs = null, $relative = false, $returnPath = 0)

当然,您需要将上面的参数替换为您的值。

我认为您使用的 JHtml::_('image.site',... 在 Joomla 3 中不再存在。

【讨论】:

  • 您好,感谢您的回复。你是对的,我正在使用(image.site)。由于迁移,我遇到了很多问题,我使用以下链接修复了这些问题:
猜你喜欢
  • 2013-09-23
  • 2012-03-30
  • 2013-07-10
  • 2013-11-14
  • 2016-05-08
  • 1970-01-01
  • 1970-01-01
  • 2014-03-01
  • 2011-02-12
相关资源
最近更新 更多