Sany
Forum Replies Created
-
Forum: Plugins
In reply to: [Contact Form 7] Getting default values from URL with anchor linkThe link also works on other pages just not when the form is on the same page.
https://website.com/packages/?package=package1#request-package
behaves like https://website.com/packages/#request-packageIt’s not a Divi bug, so it must be a bug in CF7 plugin?
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Relevanssi and WP All ImportHi Mikko,
just for your information – I’m using Relevanssi Premium 2.10.1 and the plugin WordPress Importer for importing content. I had same problem with slow imports which ended up in timeouts sometimes.
Replacing/lib/indexing.php
fixes the problem for me.Forum: Plugins
In reply to: [Relevanssi - A Better Search] Media library search not workingUpdating Relevanssi Premium to 2.8.2 resolves the problem.
Thank you Mikko!Forum: Plugins
In reply to: [Relevanssi - A Better Search] Media library search not workingYes, I’m using Relevanssi Premium. Sorry, I forgot to mention. So the problem occurs since Relevanssi Premium 2.8.0.
“How Relevanssi sees this post” shows the attachments as indexed. But I can’t find it.
The queries looks fine when I copy them to dbms there is a result.
??Forum: Plugins
In reply to: [Relevanssi - A Better Search] Media library search not workingThis is the result of index debugging of an example image:
Indexing taxonomy terms for category1 Indexing taxonomy terms for category2 Indexing taxonomy terms for category3 Custom fields to index: field1, field2, field3, _relevanssi_pdf_content Indexing post excerpt: Indexing MySQL columns. Indexing PDF content for parent post. Indexing post title. Title, tokenized: test Indexing post content. Post content after relevanssi_post_content: Content, tokenized: Final indexing query: INSERT IGNORE INTO wp_relevanssi (doc, term, term_reverse, content, title, comment, tag, link, author, category, excerpt, taxonomy, customfield, type, taxonomy_detail, customfield_detail, mysqlcolumn) VALUES (131696, 'test', REVERSE('test'), 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'attachment', '', '', 0)
I don’t use a filter function on
relevanssi_indexing_restriction
hook anymore since I recognized that I can set images not to index in the settings.
I also tried to outcomment all filter functions that I use for Relevanssi and rebuild the index but still no search results.Forum: Plugins
In reply to: [Relevanssi - A Better Search] Media library search not workingNo, I can’t find the files there.
I deactivated all plugins but Relevanssi and switched to a WP standard theme to make sure that it has nothing to do with my code. But there are no results, too.
- This reply was modified 4 years, 6 months ago by Sany.
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Media library search not workingYes, the media search is working when I disable Relevanssi in WP admin.
The plugin is set not to index image attachments.
When I enable the checkbox for indexing image attachments it’s the same behaviour, also when I rebuild the index.The search is working at my homepage in the internet but not on the websites in intranet (same websites) – if this has something to do with this problem.
I installed the Query Monitor plugin, the first query is the following:
SELECT COUNT(DISTINCT(relevanssi.doc)) FROM wp_relevanssi AS relevanssi WHERE (relevanssi.term LIKE '%test%') AND ( relevanssi.doc IN ( SELECT DISTINCT(posts.ID) FROM wp_posts AS posts WHERE posts.post_type IN ('attachment') ) ) AND ((relevanssi.doc IN (SELECT DISTINCT(posts.ID) FROM wp_posts AS posts WHERE posts.post_status IN ('inherit', 'private'))))
- This reply was modified 4 years, 6 months ago by Sany.
I have the same issue, both admin search and index attachment post type are enabled.
Thanks, it is working fine now.
Forum: Developing with WordPress
In reply to: Post status transition with quick edit / bulk actionGreat,
wp_insert_post_data
filter is working well. Thank you very much.function custom_post_status_update_date($data, $postarr) { if($data['post_status'] == 'release' && get_post_status($postarr['ID']) != 'release') { $time = current_time('mysql'); $data['post_date'] = $time; $data['post_date_gmt'] = get_gmt_from_date($time); } return $data; } add_filter('wp_insert_post_data', 'custom_post_status_update_date', 10, 2);
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Exclude html tags with class from highlightingYou may need to open a new topic, I think Mikko doesn’t read it because this issue is resolved.
In my version 2.2.5 (premium) everything looks okay.Forum: Developing with WordPress
In reply to: Action for changed permalinkThanks for your advise, I found the action
post_update
which is working like a charm:function test($post_ID, $post_after, $post_before) { if($post_before->post_name != $post_after->post_name) { // do something } } add_action('post_updated', 'test', 10, 3);
Forum: Developing with WordPress
In reply to: Action for changed permalinkOkay, it makes sense to use
save_post
therefore. So I need to compare current post name with the new one in the next step. But how can I compare current and new values?if($post->post_name != $post(???)->post_name) { echo 'post_name has changed'; }
Forum: Developing with WordPress
In reply to: Action for changed permalinkThanks but I’m talking about changing a permalink when the post is already published.