-
AuthorPosts
-
April 30, 2019 at 10:26 am #1095690
Hi
I have wordpress 5.1.1-de_CH installed with enfold 4.5.3. Hence the whole site is in German.
All works fine but the search function with the magnifying glass is always in english. Text says “search” instead “suchen”. And also the replies are all in english. Everything else is in German.
Also some searches cant be found although the keyword is on a page listed. E.g the word “Hausordnung” is on the page when menu “dokumente” is selected but can’t be found on the site and the reply is again in english.
Thanks in advance for support
TonyApril 30, 2019 at 11:03 am #1095709Hi
I found the problem regarding translation. There is no de_CH.po / de_CH.mo file in the enfold theme only de_DE.mo/.po. Hence I just copied the de_DE.mo/.po to de_CH.po / de_CH.mo and the translation works.
Suggest you add in future also de_CH files to lang directory….However the second problem is still open. Certain searches can’t be found on the website. Like above mentioned words like “Hausordung” or “Wohnungsbewerbung” can’t be found although on the page with menu item “Dokumente”.
Is there a way to “index” page?
Beste regards
TonyMay 2, 2019 at 1:24 pm #1096460Hi,
Thank you for using Enfold.
We will add the de_CH language files for the next release.
The searches do not work for Advanced layout builder elements. The content of some elements (like Special Heading) is not part of the page/post content but is stored in shortcode attributes.
As we are using the standard WP search – probably WP ignores shortcodes in search.
Could be, that a plugin like https://de.wordpress.org/plugins/relevanssi/ gives better results.
Best regards,
GünterMay 2, 2019 at 4:34 pm #1096519Hi Günter
Thanks for your response. So you are saying that the standard WP search does not index anything within an avia element ?
However certain content is indexed certain not…I installed the relevanssi. The good thing is that it can find much more. But when I example search for “Hausordnung” it does not show up when just typing. It comes even with the message not document, however if i then hit return it shows up in the search result.
How can I make sure it also shows up during typing in the magnifying glass?
I added the following to function.php as per https://kriesi.at/documentation/enfold/search/
(however can not see any difference if below is added or not to function.php in the child theme)add_filter(‘avf_ajax_search_function’, ‘avia_init_relevanssi’, 10, 4);
function avia_init_relevanssi($function_name, $search_query, $search_parameters, $defaults)
{
$function_name = ‘avia_relevanssi_search’;
return $function_name;
}function avia_relevanssi_search($search_query, $search_parameters, $defaults)
{
global $query;
$tempquery = $query;
if(empty($tempquery)) $tempquery = new WP_Query();$tempquery->query_vars = $search_parameters;
relevanssi_do_query($tempquery);
$posts = $tempquery->posts;return $posts;
}regards
TonyMay 8, 2019 at 10:00 am #1098397Hi,
I’ve never worked with relevansi – but I will ask the other mods.
Best regards,
GünterMay 8, 2019 at 1:55 pm #1098451Hi,
Well, I installed relevansi plugin on my dev server, added the code above to my functions.php.
I indexed the site from relevansi settings page -> Indexing -> Build index.
Added a post with ALB and “Special Heading” -> Heading Text: Neue Welt ist da.
Opened a page with magnific class
In search field I entered: NeueAnd the post is shown in the search result dropdown.
Also adding a page with the same shows page and post in search results (of course with the title of the post/page).
The queried text is in the content and not in the title – therefore not visible.Best regards,
GünterMay 8, 2019 at 4:07 pm #1098496Hi Günter
Thanks for feedback.
Have you tried to create a page with ALB and use layout elements e.g add a text element within a column?
Does it than find it with the magnified glass after indexing again?Best regards
TonyMay 8, 2019 at 5:54 pm #1098523Hi,
Thanks for this – you are right. It is not working.
I will have a look into it tomorrow and come back.
Best regards,
GünterMay 9, 2019 at 3:41 pm #1098960Hi,
I integrated support for relevanssi in core.
In private content you find the latest version of Enfold with this integration (as beta version).
Download the zip, unpack and upload with ftp (replace folder enfold).
You can remove the code you added here.
You need to reindex the search because now we allow relevanssi to process the shortcodes in backend when saving the post – so they can index it.
CH language file is already included in that version.
Do not forget to make a backup for fallback – clear server and browser cache.
If you need assistance with uploading let us know.
Best regards,
GünterMay 9, 2019 at 4:29 pm #1098995Hi Günter
First thanks a lot for your support.
Installed beta version, removed code for relevanssi I added here and executed a new indexing.
Fazit:
– Works with the CH language file.
– Search better but still not satisfying.
– The search results beneath the search field (kind of preview) do no longer show up.. (however can live with that but was a nice to have feature)However as soon as columns are used the content is not index (see comment in privat area)
May 13, 2019 at 4:17 pm #1100148Hi,
I uploaded a modified version.
On my install the columns are indexed and shown in ajax search results.
If it does not work for you, can you create an admin account for me and enable ALB debug mode by adding the code provided in this link to your functions.php file which can be accessed from Appearance > Editor
This lets us view the shortcode for all the page elements so I can check it on my install.
Disable caching, clear server and browser cache.
Best regards,
GünterMay 14, 2019 at 10:05 am #1100435Hi Günter
I added the code to functions.php and created the account.
There is no caching enabled.
regards
TonyMay 14, 2019 at 3:28 pm #1100610Hi,
Thanks for the credentials.
I copied the shortcodes to my install – and content was found using the ajax search (though it needed to save the page 2 or three time).
As you are using the block editor and ALB – this could be a reason. If you do not need the block editor, select Classic Editor in Theme Options Tab -> Select Your Editor.
Could be, that relevanssi in not fully compatible with the block editor.
What is also strange: the possible results / No matches is not displayed below the ajax search box on your site.
That’s different from my install.I do not want to mass around in a live site – but also try to disable Enfold js compression during testing and changing files (and clear browser cache several times).
I uploaded a new beta version that works on my install – see private content below
Best regards,
Günter- This reply was modified 5 years, 6 months ago by Günter.
May 14, 2019 at 4:14 pm #1100650Hi Günter
Thanks for checking. I enabled the classic editor. Still no matches displayed below ajax search box.
Also uploaded new beta version.
Looks as if search results are a bit better, however the “hausordnung” is still not correctly found in the “document” page (after clearing cache many times).
I did not disable compression as the site is live and not sure if this could have an impact on the site…
What wonders me as well is, when I search for “hausordnung” and click on the search result, the pdf as preview is shown like an image and below are facebook, twitter links.. where are these links coming from?
Regards
TonyMay 14, 2019 at 4:43 pm #1100665Hi,
The result links to an attachment – seems that relevanssi finds the attachment. Seems to be a WP default template for attachments.
Missing ajax search results below popup could be a problem with the ajax call.
Maybe you can try in the evening when there is only few traffic to disable the merging and check. You can enable it after that again.
Can you check the server error log if you find something there.Best regards,
Günter -
AuthorPosts
- You must be logged in to reply to this topic.