dongshedan4672 2015-05-27 12:21 采纳率: 0%
浏览 60
已采纳

Joomla,Falang集成组件......致命错误:在null上调用成员函数getTable()

Hello I am having some issues for integrate a custom component of joomla in Falang for multilanguage website

Debugging I got null:

Fatal error: Call to a member function getTable() on null

object(ContentObject)[183] public '_contentElement' => null

My XML for integrate my component looks as:

 <?xml version="1.0"?>
    <falang type="contentelement">
      <name>Members</name>
      <author>Stackoverflow.com</author>
      <version>1.0.0</version>
      <description>Definition for the core Members component</description>
      <copyright>stackoverflow.com</copyright>
      <reference>
        <table name="chambercommerce_members">
            <field type="referenceid" name="id" translate="0">ID</field>
            <field type="titletext" name="company_name" translate="1">Company Name</field>
            <field type="text" name="country" translate="1">Country</field>
            <field type="text" name="benefits_discounts" translate="1">Benefits</field>
            <field type="text" name="web" translate="0">Web</field>
        </table>
      </reference>
      <translationfilters>
         <frontpage>id</frontpage>
         <keyword>company_name</keyword>
         <id>id</id>
      </translationfilters>
    </falang>

I make my xml looking the others one in my joomla installation for falang and there is this var_dump.

<em>object(ContentObject)[180]  public '_contentElement' => object(ContentElement)[179]  public '_xmlFile' => ...</em>

Any help for fix it?

Call Stack:

( ! ) Fatal error: Call to a member function getTable() on null in C:\xampp2\htdocs\website.com\administrator\components\com_falang\models\ContentObject.php on line 747
Call Stack
#   Time    Memory  Function    Location
1   0.0009  134496  {main}( )   ...\index.php:0
2   0.0741  2216528 JApplicationCms->execute( ) ...\index.php:42
3   0.0741  2216792 JApplicationAdministrator->doExecute( ) ...\cms.php:245
4   0.1535  4563008 JApplicationAdministrator->dispatch( )  ...\administrator.php:159
5   0.1565  4603072 JComponentHelper::renderComponent( )    ...\administrator.php:98
6   0.1614  4636208 JComponentHelper::executeComponent( )   ...\helper.php:332
7   0.1621  4669360 require_once( 'C:\xampp2\htdocs\website.com\administrator\components\com_falang\falang.php' )   ...\helper.php:352
8   0.2074  5752552 JControllerLegacy->execute( )   ...\falang.php:78
9   0.2074  5752848 TranslateController->editTranslation( ) ...\legacy.php:722
10  0.2172  6208560 TranslateViewTranslate->display( )  ...\translate.php:245
11  0.2374  6515680 FalangViewDefault->display( )   ...\view.php:80
12  0.2470  6795128 JViewLegacy->display( ) ...\view.php:70
13  0.2470  6795384 JViewLegacy->loadTemplate( )    ...\legacy.php:211
14  0.2499  6900192 include( 'C:\xampp2\htdocs\website.com\administrator\components\com_falang\views\translate\tmpl\edit.php' ) ...\legacy.php:663
15  0.2500  6900664 ContentObject->getTable( )
  • 写回答

2条回答 默认 最新

  • dongyong6428 2015-06-04 09:09
    关注

    I did it.

    The issue: xml name should be iqual to database table name. SO I rename to mytable.xml and it worked perfectly

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?