jDiction Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

jDiction 2.2.0 released. http://jdiction.org/downloads

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - nkt

Pages: [1] 2
1
Hi all,

Unfortunately jDiction isn't indexing all the articles when multiple languages are configured and the total amount of articles is higher than the batch size of the indexer. However I created a solution for this problem, simply replace /ROOT/libraries/jdiction/finder/adapter.php with the attached file and your indexer will index all the articles in a correct manner.

Technical details: Not all articles are indexed. This is because the indexer increases the offset for the getItems query for every indexed article. This means that every article that is indexed the offset of the MySQL query for all languages increases, therefore skipping articles. This was temporary solved by dividing the offset by 2, however this means that a lot of articles will get indexed twice. This increases the indexed article counter, while no new articles are actually added. This results in not enough index iterations (batches) to index all articles since the amount of indexations is not equal to the amount of uniquely added articles, because some articles are indexed twice. Eventually this leads to a premature stop of the indexation. This problem is solved by adding an counter/offset per language which I have added in the attached file. See comments in attached file for explanation of the code.

@Harald: can you update jDiction so this improvement is included?

Greetz,
Nick

2
General Questions / Re: Update search index after saving translation
« on: November 01, 2016, 04:54:18 pm »
Thanks for taking a look at it! I'll use the article save function as work around.

Cheers

3
General Questions / Update search index after saving translation
« on: October 14, 2016, 06:23:48 am »
Hi all,

I have the problem that my indexed (smart) search results are not updated after I change the translation. I figured out that if I save the translation, the translation isn't reindexed. However if I also save the original article then the translation is reindexed. I guess that saving the article in the com_content environment triggers the Jdiction Smart Search plugin and the saving the translation in the com_jdiction doesn't trigger the Jdiction Smart Search plugin.

Did someone already found/coded a solution for this?

Specs:
Joomla 3.6.2
Jdiction 2.0.0
2 (active) languages

Cheers Nick

4
Extensions and jDiction / Re: 3rd party translation
« on: April 30, 2014, 11:28:14 pm »
Hi Harald,

It get the following message: 
Code: [Select]
Fatal error: Class 'MySqlParser' not found in SITE_ROOT\libraries\jdiction\database\database\mysqli.php on line 122

5
Extensions and jDiction / Re: 3rd party translation
« on: April 30, 2014, 06:30:17 pm »
Found it, you need to comment in Community builder admin.comprofiler.html.php located in SITE_ROOT/administrator/components/com_comprofiler
Start: line 868
Code: [Select]
//if ( substr( $sortfield->name, -1, 1 ) != ')' ) {
// $sortfieldName = '`' . $sortfield->name . '`';
//} else {
$sortfieldName = $sortfield->name;
//}
Start: line 828
Code: [Select]
//if ( substr( $sortpart['field'], -1, 1 ) != ')' ) {
// $sortfiNam = '`' . $sortpart['field'] . '`';
//} else {
$sortfiNam = $sortpart['field'];
//}

6
Extensions and jDiction / Re: 3rd party translation
« on: April 30, 2014, 06:08:58 pm »
Thank you Harald! I just figured that out, because I traced the problem till deep in the parser. :'(

Explanation for others: you're not allowed to have ` around non-operators. Want to know more, check line 121 and 122 of position-calculator.php in SITE_ROOT/libraries/jdiction/database/parser/classes

I let you know where to edit in Community Builder

7
Extensions and jDiction / Re: 3rd party translation
« on: April 30, 2014, 04:18:38 pm »
Hi all,

I have the same problem and I found the SQL query:
Code: [Select]
SELECT DISTINCT ue.*, u.*, '' AS 'NA' FROM #__users u JOIN #__user_usergroup_map g ON g.`user_id` = u.`id` JOIN #__comprofiler ue ON ue.`id` = u.`id` WHERE u.block = 0 AND ue.approved = 1 AND ue.confirmed = 1 AND ue.banned = 0 AND g.group_id IN ( 6, 2, 3, 4, 5) ORDER BY `name` ASC
The code is executed at line 346 of cb.lists.php in SITE_URL/administrator/components/com_comprofiler/library/cb.

I'll try to fix the problem, but if you know how to solve it immediately please let me know!

Official error: UnableToCalculatePositionException: cannot calculate position of name within BY `name` ASC

Further more if I remove
Code: [Select]
ORDER BY `name` ASC the problem is solved

8
Extensions and jDiction / Compatibility with RQuote
« on: April 30, 2014, 02:57:24 pm »
For who is interested: in the attachment you can find the XML file which makes RQuote and jDiction work together.
Place it in the folder: SITE_ROOT/administrator/com_rquote

Greetz!

9
Extensions and jDiction / Re: XML for custom made params
« on: April 30, 2014, 02:03:54 pm »
No problem! Thanks for all the help anyway!

If I have some lost hours one of these weeks, I will try to fix it for you.

10
Extensions and jDiction / Re: XML for custom made params
« on: April 30, 2014, 01:36:17 pm »
Hi Harald,

I came to the conclusion that the translation part already worked for this code:
sure ;-)

you have to enclose the fieldset with a field tag

Code: [Select]
<fields name="params">
  <fieldset name="FILTER" label="COM_JDICTION_TRANSLATION_FIELDSET_MAIN">
    <field name="namefilter1" />
  </fieldset>
</fields>

However what confused me is that the tiptext in the admin screen stays empty.

This caused by the fact that
Code: [Select]
$this->original in jform_25.php(view) contains the following:
Code: [Select]
title = 'Onderzoek'
alias = 'onderzoek'
metakey =
metadesc =
description =
params = '{"category_layout":"","image":"","filter_exptag":"1","namefilter1":"Ik zoek een onderzoeksmethode voor:","namefilter2":"","namefilter3":""}'
jd_sourcehash ='...'

Next in your code it is searching for the item called "namefilter1", however it will not find it, because it is placed under "params" as a json code.
I'll try to code it such that it takes the json variables and put them as items in the object.

PS above problem also holds for the menu params created by the menu.xml and for the alternative read more of a article.

11
Extensions and jDiction / Re: XML for custom made params
« on: April 29, 2014, 06:09:13 pm »
The field shows up when I include it in the same form tag, however it looses the link with the original language as the tip(popup) content is empty.

Tonight I will work on it more. If you have another good idea, please let me know!

12
Extensions and jDiction / Re: XML for custom made params
« on: April 29, 2014, 05:27:55 pm »
Unfortunately that doesn't work, the field doesn't even show up in the translation form.

And why do I need to enclose it in the fields tag, because the "main" fieldset is also not enclosed by a fields tag.

Thanks for helping me!

13
Extensions and jDiction / Re: XML for custom made params
« on: April 29, 2014, 04:42:19 pm »
Thnx Harald, however I still got the problem that I can't translate my custom parameters :'(

Do you have an idea how to edit the categories.xml, such that it will also translate my custom parameters?

14
Extensions and jDiction / XML for custom made params
« on: April 29, 2014, 04:11:03 pm »
Hi all,

I made a plugin that adds extra parameters to the category detail view in the backend. It adds the following XML file stored in the plugin folder to the form:
Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
<form>
<fields name="params">
<fieldset name="FILTER">
<field name="filter_exptag" type="checkbox" label="PLG_CONTENT_CATFILTER_EXPTAG" value="1" default="0" />
<field name="namefilter1" type="text" label="PLG_CONTENT_CATFILTER_TEXT" description="PLG_CONTENT_CATFILTER_TEXT_DESC" size="30" />
<field type="spacer" name="myspacer1" hr="true" />
<field name="filter_relexp" type="checkbox" label="PLG_CONTENT_CATFILTER_RELEXP" value="1" default="0"/>
<field name="namefilter2" type="text" label="PLG_CONTENT_CATFILTER_TEXT" description="PLG_CONTENT_CATFILTER_TEXT_DESC" size="30" />
<field type="spacer" name="myspacer2" hr="true" />
<field name="filter_relsec" type="checkbox" label="PLG_CONTENT_CATFILTER_RELSEC" value="1" default="0"/>
<field name="namefilter3" type="text" label="PLG_CONTENT_CATFILTER_TEXT" description="PLG_CONTENT_CATFILTER_TEXT_DESC" size="30" />
</fieldset>
</fields>
</form>
The problem is that I won't succeed in translating these custom params. I tried the following for categories.xml and many variations:
Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
<jdiction>
  <component>com_categories</component>
  <sections>
    <section>
      <tables>
        <table>
          <name>#__categories</name>
          <key>id</key>
          <class>CategoriesTableCategory</class>
          <file>category.php</file>
          <exportfilter>title != "ROOT"</exportfilter>
          <cache fullfetch="1" />
        </table>
      </tables>
      <views>
        <view name="category" list="categories" layout="edit" default="true">
          <form import="category.xml">
          <fieldset name="main" label="COM_JDICTION_TRANSLATION_FIELDSET_MAIN">
              <field name="title" />
              <field name="alias" type="jdalias" field="title" export="false" />
              <field name="metakey" />
              <field name="metadesc" />
              <field name="description" />
            </fieldset>
          </form>
  <form import="..\..\..\..\..\plugins\content\catfilter\catfilter.xml">
          <fieldset name="FILTER" label="COM_JDICTION_TRANSLATION_FIELDSET_MAIN">
              <field name="namefilter1" />
            </fieldset>
          </form>
        </view>
      </views>
    </section>
  </sections>
</jdiction>

To make it more clear, I added my plugin.

15
Extensions and jDiction / Re: sh404SEF 4.4 and jDiction 1.1
« on: April 29, 2014, 01:29:36 pm »
OK, I solved the problem and it works totally fine now. I changed a lot of stuff, but the main reason was that I didn't had a non-SEF url to the English part of the website. So there was a link on my homepage linking to SITE_URL/en, but not to SITE_URL/index.php?lang=en. After cleaning the created URL's, I first need to load SITE_URL where after I can load the English part of the website. Strange enough this didn't gave problems when I didn't use jDiction.

Conclusion sh404SEF and jDiction 1.1.9.1 work fine with each other.

Pages: [1] 2