joomla3.0 - Joomla API 12.1 Cli JTable returns false when trying to instantiate the Content Table -
i have found several examples online, seem use older api versions of joomla , not work 12.1 api. i'm sure simple i'm missing, cannot seem find it.
// bootstrapping stuff here require_once( "../configuration.php" ); $kconfig = new jconfig; $kdb = jdatabase::getinstance( array( 'driver' => $kconfig->dbtype, 'host' => $kconfig->host, 'user' => $kconfig->user, 'password' => $kconfig->password, 'database' => $kconfig->db, 'prefix' => $kconfig->dbprefix ) ); jfactory::$config = new jregistry( $kconfig ); $kpage = new cpage( root_dir."/index.html" ); echo "injecting: ". $kpage->m_strtitle."\n"; echo "\t". $kpage->m_strkeywords."\n"; echo "\t". $kpage->m_strdesc."\n"; $table = jtable::getinstance( 'content', 'jtable', array( 'dbo' => $kdb ) ); var_dump( $table ); output: bool( false )
i continue research, rather continuing beat head against wall, wanted ask here see if has done similar. , before question gets asked - purpose of script migrate existing static html joomla! site. , no cannot done manually due volume of pages need converted.
are bootstrapping platform? 12.1, need using legacy bootstrap (https://github.com/joomla/joomla-platform/blob/12.1/libraries/import.legacy.php) jtablecontent loaded due file's physical location changing.
Comments
Post a Comment