Well, I could clean the code so I´ll try to compilate:
- Bug, unresolved: Triying to execute the indexer from console will fail to load Jdiction, so it won´t translate properly the entries.
Didn't check this sorry
- jdcontent.php
- Line 287,
$params = $obj->params;
will generate notice or warnings, I have added a check here
if (isset($obj)) { $params = $obj->params }
Fixed
- Line 366, there are two problematic lines
if (strpos($item->route, 'Itemid'))
but as long as I could recall, this comparison leave out a lot of entries. And this comparisons aren´t on the original content.php. I have changed them Itemid with id, but I guess that even this comparison is meaningless and unnecesary
Fixed by removing this code, I filtered all articles out where no menu item and no category menu item exists, (used by me for special pages, but this is better done with meta data robots: "noindex" option
- Line 450, function getListQuery
I have added this line before returning the query
$sql->order("a.id");
I don´t know why, but when I was doing the queries it returns me something like
id 21
id 22
id 23
id 18, this one entry is out of order, something that really doesn´t have to affect the results, but it seemed to do...
thats hard to say why this is, maybe you print the query that get fired and try them in phpmyadmin
[li]adapter.php[/li]
- I´m going to keep my adapter version. I have being tracing my solution and is not efficient (it will reindex several times the same item), but it gets the job done. I have tried your onBuildIndex but doesn´t work, I think that is because of the way it calculates the limit. I would like to do more test and let you know but I´m near production and this is currently working :D
I followed your approach until I have time to fix it
- Line 90, getItems function,
$db = JFactory::getDbo()
or
use $this->db
?
Changed
- Line 113, the solution I´m using
setQuery($query, $offset/count($languages), $limit)
instead of
setQuery($query, $offset, $limit)
the other posibility would be override onBuildIndex, but I don´t have the time to do the proper tests and this is working now
As mentioned above I use the same code until I fix it.
- Add the getContentCount function we said before
done ;-)
[li]jddatabase.php[/li]
- method_exists(parent, )
is wrong, the proper method to avoid notices is
method_exists(get_parent_class($this), )
There is at least two of this method_exists(parent). I could solve one, but the other one seems to break with the change.
[/list]
I removed both calls to parent::__wakeup and parent::__sleep because they are not used in joomla atm.
- Unresolved bug, probably nothing related to jdiction: When the indexer tries to optimize a big table like the one generated, it breaks.
Did'nt tested this.
I attached the 3 files I changed so they should work with your version. I also updated some variables from joomla-master.