dongqiancui9194 2013-10-06 19:44
浏览 41
已采纳

joomla JViewHTML构造函数和“找不到布局路径”

please read last line of question.

JviewHtml constructor contains following statement

$this->paths = isset($paths) ? $paths : $this->loadPaths();

i am setting the default path of myview using $path variable and passing it to constructor.

$paths = new SplPriorityQueue;
$paths->insert(JPATH_COMPONENT . '/views/' . $viewName . '/tmpl', 'normal');

in net beans debugger when i execute following statement of constructor $this->paths is not showing the value of $paths variable. although data type of both are splpriorityque

$this->paths = isset($paths) ? $paths : $this->loadPaths();

first statement of render is render()

$path = $this->getPath($this->getLayout());

$path is returend with false value.

my main page shows error "Layout Path Not Found". Any solutions to that problem

UPDATE: LAST LINE paths is splpriorityque $abc=$paths; $this->paths=clone $paths

after these two statement $abc is showing correct value but $this->paths has missing or loastdata.in netbeans debugger

  • 写回答

1条回答 默认 最新

  • dongxianghuan3587 2013-10-08 12:35
    关注

    first i decided to delete this question because of very stupid mistake. but later i decided to remain as it is.

    there was some setting problem or bug in netbeans, thats why it was unable to expand $this object member "splpriorityqueue".

    $this->paths = isset($paths) ? $paths : $this->loadPaths();
    

    above statement is perfectly correct.

    and the error "layout path was not found" was beacause i named my tmpl folder as templ. which was causing realpath() function in

    JPath::find() 
    

    to not work properly.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用