GetSimple Support Forum
Search plugin (I18N) - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13)
+--- Thread: Search plugin (I18N) (/showthread.php?tid=1256)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29


RE: Search plugin (I18N) - celextel - 2019-05-16

(2019-05-16, 00:24:43)Carlos Wrote: Did you follow the plugin instructions?
Have you inserted (% searchform %) (% searchresults %) in your search page?

Yes, we have the following Code in that Page:
Code:
<p>(% searchform %)<br />
    (% searchresults %)</p>



RE: Search plugin (I18N) - Carlos - 2019-05-16

Edit and save any page (no need to do any change), to make sure the plugin generates its index files.


RE: Search plugin (I18N) - celextel - 2019-05-16

(2019-05-16, 03:59:59)Carlos Wrote: Edit and save any page (no need to do any change), to make sure the plugin generates its index files.

This has not made any difference. Thanks.


RE: Search plugin (I18N) - Carlos - 2019-05-16

After updating any page, you should have some index files (i18n_tag_index.txt, i18n_date_index.txt, ...) in folder /data/other/

If not, perhaps the plugin cannot write those files for some reason. Go to admin-> Support -> Website health check and see if there is any warning under "Directory Permissions".


RE: Search plugin (I18N) - celextel - 2019-05-17

Thanks for your guidance.

We are finding only the following i18n files in folder /data/other/:
i18n_menu_cache.xml
i18n_search_settings.xml
i18n_settings.xml

The i18n index files are not there.

There is also no Warning under Directory Permissions after Health Check:
/data/other/ 0755 Writable - OK

Activation after Deactivation also has not helped.


RE: Search plugin (I18N) - celextel - 2019-05-17

We just tried with the following code also:
(% searchform showTags:0 ajax:0 %) (% searchresults %)

This also has not helped.

Shall we include jQuery in the template and then try?


RE: Search plugin (I18N) - Carlos - 2019-05-17

The plugin should work ok without javascript, using the default placeholders (% searchform %) (% searchresults %)

I think that the problem is that for some reason it is not generating the index files.

I suggest your check your errorlog.txt file (in data/other/logs) to see if there are any errors related to this plugin.


RE: Search plugin (I18N) - celextel - 2019-05-17

(2019-05-17, 05:26:43)Carlos Wrote: The plugin should work ok without javascript, using the default placeholders (% searchform %) (% searchresults %)

I think that the problem is that for some reason it is not generating the index files.

I suggest your check your errorlog.txt file (in data/other/logs) to see if there are any errors related to this plugin.

Dear Mr. Carlos,

We do not have the following file:
data/other/logs/errorlog.txt

data/other/logs/failedlogins.log is of 0 bytes.

Please let us know whether this issue could be due to one of the following reasons:
  •     1160 Total Pages
  •     Admin Folder is Restricted through .htaccess Password
  •     /data/other/logs/failedlogins.log    XML Invalid - Error!
  •     Apache web server    LiteSpeed - Error
We tried this Plugin few months back and it did not work at that time also. We did not have .htaccess Password for the Admin at that time.

This is the second time we are trying this Plugin.

We were using MODX Evolution CMS for about 15 Years to Host these Pages of our Spiritual Library. We started encountering some issues and hence we switched over to GetSimple CMS few months back.

We were also using WordPress for some time in the beginning.
 
We are more familiar with osCommerce as we have been using the same since 2002 to Host our Celextel Spiritual Store.

We definitely need Search Facility for our Vedanta Shastras Library.

Please help us with more suggestions in regard to this.

Thanks,

Lakshmanan


RE: Search plugin (I18N) - Carlos - 2019-05-17

Enable debug mode in gsconfig.php and check if you get any errors (both in the search page and in backend, when you edit/create and save a page)


RE: Search plugin (I18N) - celextel - 2019-05-18

(2019-05-17, 23:15:12)dCarlos Wrote: Enable debug mode in gsconfig.php and check if you get any errors (both in the search page and in backend, when you edit/create and save a page)

We are not getting any Errors after enabling Debug Mode. We checked the Search Page by Searching, by Creating a New Page and also by Editing & Saving an Existing Page. DEBUG MODE Notice and Debug Console is seen in the Admin. We have disabled the debug mode after Testing. Thanks.


RE: Search plugin (I18N) - Carlos - 2019-05-18

It might be because of the high number of pages you have. I see that when you try to search in your page, the results page is broken (no sidebar, no footer..). There should be some error there with debug mode enabled, unless you have GSSUPRESSERRORS enabled in gsconfig. Or check again errorlog just in case.


RE: Search plugin (I18N) - celextel - 2019-05-18

(2019-05-18, 03:16:26)Carlos Wrote: It might be because of the high number of pages you have. I see that when you try to search in your page, the results page is broken (no sidebar, no footer..). There should be some error there with debug mode enabled, unless you have GSSUPRESSERRORS enabled in gsconfig. Or check again errorlog just in case.

Yes, you are correct.

We found the following and disabled it:
define('GSSUPPRESSERRORS',true);
-> We did not enable this.

Search Result Page is showing the Following Error Message after enabling the DEBUG MODE:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 86 bytes) in /home/shastras/public_html/plugins/i18n_search/indexer.class.php on line 162

We did not find any errors in the Admin.

Please guide us as to how to proceed in this regard.

Thanks,

Lakshmanan


RE: Search plugin (I18N) - celextel - 2019-05-18

data/other/logs/errorlog.txt is showing the following error messages:
Code:
[18-May-2019 09:21:23 Asia/Kolkata] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 86 bytes) in /home/shastras/public_html/plugins/i18n_search/indexer.class.php on line 162

Main error_log file is empty.


RE: Search plugin (I18N) - Carlos - 2019-05-18

You have too many pages. Your system does not have enough RAM for I18N Search to generate its indexes.

Anyway this CMS is designed to work with less pages. I suppose you didn't create all of your pages using GetSimple's page manager, but instead you generated them with some script.

I would rather use google site search instead of a plugin.


RE: Search plugin (I18N) - celextel - 2019-05-18

(2019-05-18, 16:44:26)Carlos Wrote: You have too many pages. Your system does not have enough RAM for I18N Search to generate its indexes.

Anyway this CMS is designed to work with less pages. I suppose you didn't create all of your pages using GetSimple's page manager, but instead you generated them with some script.

I would rather use google site search instead of a plugin.

We created all these pages one by one in GetSimple's Admin itself by Copy Pasting the Content from our MODX Site.

Thanks for your help and suggestions in this regard.

Lakshmanan


RE: Search plugin (I18N) - celextel - 2019-05-19

(2019-05-18, 16:44:26)Carlos Wrote: I would rather use google site search instead of a plugin.

Dear Mr. Carlos,

We have added Google Search to our Vedanta Shastras Library based on your suggestion.

We are not facing any other issues with GetSimple CMS as of now. We had chosen this CMS after going testing many other CMS.

Thanks for your guidance and suggestions.

Lakshmanan


RE: Search plugin (I18N) - celextel - 2019-05-25

Dear Mr. Carlos,

I18N Search Plugin is now working in our Vedanta Shastras Library after we added the following directive to .htaccess File:
Code:
php_value memory_limit 256M

Default memory_limit Value is 128M.

We are also retaining Google Custom Search Engine as of now.

Thanks,

Lakshmanan


RE: Search plugin (I18N) - Alan-A - 2020-05-12

Hello,
I'm using i18n and i18n search in my web-site and after after carrying out a search from either the search form or the tag cloud the page is loaded with a mixture of languages. This only happens when I call the search with my site's second language (English) active.

The search results page is loaded correctly - i.e. the English version suchergebnisse_en - but the following happens:
  • $language changes to German. This in turn means that:
    [**]the language selection menu changes to the site's first language (German)
    [**]the language of the search form and tag cloud change to German
  • The i18n Navigation menus remain in English.

I'm calling my language menu in my header.inc.php template using:
Code:
<?php if ($language == 'en') { ?>
    English
<?php } else { ?>
    <a href="<?php echo htmlspecialchars(return_i18n_setlang_url('en')); ?>">English</a>
<?php } ?>

I'm calling the search form in my header.inc.php file using, for example:
Code:
<?php if ($language == 'en') {
    get_i18n_search_form(array('slug'=>'suchergebnisse_en','showTags'=>'0'));
} ?>

I'm calling the tag cloud in a language-specific component with :
Code:
<?php get_i18n_tags(array('lang'=>'en', 'showlang'=>'0', 'slug'=>'suchergebnisse_en')); ?>

The links in the tag cloud are rendered correctly - pointing to, for example:
- http://.../getsimple/suchergebnisse_en/?tags=translation

My search result pages are language-specific (i.e. suchergebnisse & suchergebnisse_en) and I'm calling the results with:
Code:
(% searchresults numWords=15 showLanguage=0 HEADER='' component=searchresultrenderer lang=en %)

The searchresultrenderer component has:
Code:
<h3 class="search-entry-title">
 <?php if ($showLanguage) { ?>
 <span class="search-entry-language">
   <?php echo htmlspecialchars($item->language, ENT_NOQUOTES); ?>
 </span>
 <?php } ?>
 <a href="<?php echo $item->link; ?>">
   <?php echo htmlspecialchars($item->title, ENT_NOQUOTES); ?>
 </a>
</h3>
<?php if ($showDate) { ?>
<div class="search-entry-date">
 <?php echo strftime($dateFormat, $item->pubDate); ?>
</div>
<?php } ?>
<div class="search-entry-excerpt">
 <?php echo $item->getExcerpt($item->content, $numWords); ?>
</div>

There are no errors in the errorlog.txt file.

I am however getting a warning:

Code:
Warning: count(): Parameter must be an array or an object that implements Countable in S:\xampp\htdocs\_aa-de\getsimple_test\plugins\i18n_navigation\frontend.class.php on line 219


Could someone give me a hint about what I'm doing wrong?

You can see this on www.alan-amos.de

Many thanks in advance
Alan


RE: Search plugin (I18N) - Make or Break Issue - Alan-A - 2020-06-07

Does anyone have an idea how I could solve my problem with the Search Plugin and $language (post 671 above) ?
Many thanks in advance,
Alan


RE: Search plugin (I18N) - Make or Break Issue - Bigin - 2020-06-10

Try downgrade php to 5.6
This plugin may be deprecated.


RE: Search plugin (I18N) - Make or Break Issue - Alan-A - 2020-06-10

(2020-06-10, 19:54:39)Bigin Wrote: Try downgrade php to 5.6
This plugin may be deprecated.

Thanks. I'll try that.


RE: Search plugin (I18N) - Make or Break Issue - Alan-A - 2020-06-10

(2020-06-10, 19:54:39)Bigin Wrote: Try downgrade php to 5.6
This plugin may be deprecated.

My web site is now using PHP5.6.
Unfortunately, that hasn't helped/changed anything........


RE: Search plugin (I18N) - hameau - 2020-06-11

(2020-05-12, 19:28:11)Alan-A Wrote: I'm using i18n and i18n search in my web-site and after after carrying out a search from either the search form or the tag cloud the page is loaded with a mixture of languages. This only happens when I call the search with my site's second language (English) active.

Hello,

Sorry, I glossed over this when you first posted – too complicated and in a hurry ... ;-)

Which browser are you using? With Firefox 77 (on Linux), I saw the effect that you describe, until I disabled Enhanced Tracking Protection in Firefox, for your site. Then it works as expected.

Testing in Chromium (Linux), it also works as expected.

After getting it working in Firefox, I can enable tracking protection again and it continues to work. I'm not able to clear the browser cache right now, so I can't check the effect of doing that.

So, it would appear to be a cookie-setting issue (guesswork).

You can ignore the PHP warning, or modify the file (path given in the warning that you posted), line 219, to:
Code:
'haschildren' => $showChildren ? count((array)$children) > 0 : self::hasChildren($childurl, $show)



RE: Search plugin (I18N) - Alan-A - 2020-06-11

Hello Nick and many thanks for your reply.

I've been working with FF77 and FF mobile but have just tested with Vivaldi, Edge and IE11, all of which (on Windows) show the switching of languages. I've tried switching off Tracking Protection in FF but that didn't make a difference for me.

I'm not bothered about the PHP warning as that goes when I switch off debugging. I mentioned it as a possible relevant bit of information.

Best regards,
Alan


RE: Search plugin (I18N) - hameau - 2020-06-11

Forget my last effort, it's the wrong direction.

This is wrong:
(2020-05-12, 19:28:11)Alan-A Wrote: The links in the tag cloud are rendered correctly - pointing to, for example:
- http://.../getsimple/suchergebnisse_en/?tags=translation

I think the search result link should always be http://.../getsimple/suchergebnisse/?tags= ... (i.e., without _en suffix). The display language is set internally and handled by I18N Search.

Manually select the language at the top of the page, which sends setlang=. Then paste a search into the browser address bar directly, e.g.:
Code:
http://www.alan-amos.de/suchergebnisse/?tags=content_management_system

(Tag 'content_management_system' is the only one with results in both English and German – make a couple of others if you want to test more widely.)

The results will follow the last language selection and all menus, form text and tag cloud are also in the last selected language, as required.