Closed gyetger closed 1 month ago
@gyetger can you please share your EP Status Report? Especially the part with all your plugins, theme, and post types.
@gyetger can you please share your EP Status Report? Especially the part with all your plugins, theme, and post types.
I've done a "Delete all data and start fresh sync" with only "Pages" and "proba" pods type (and unnecessary plugins turned off). As you can see below, there are 6 pages and 2 "proba" posts in this test WordPress site. The index has 8 items, but 3(!) of those are marked as "proba" type, and one of them has the title of the page: "Elementor #415"
wp_version: 6.5.2 home_url: https://wpteszt.****.hu site_url: https://wpteszt.****.hu is_multisite: false theme: Hello Elementor (3.0.1) plugins: ElasticPress (5.0.2), Elementor (3.21.2), Elementor Pro (3.21.1), and Pods - Custom Content Types and Fields (3.2.1) revisions: 25
php_version: 7.4.33 memory_limit: 1000M timeout: 30
post_count: 1 page_count: 6 e-landing-page_count: 0 elementor_library_count: 10 exlibris_count: 4 foto_count: 9 kotet_count: 2 muvek_count: 4 proba_count: 2 terkeptar_count: 31 post_meta_keys: 0 page_meta_keys: 0 e-landing-page_meta_keys: 0 elementor_library_meta_keys: 0 exlibris_meta_keys: 26 foto_meta_keys: 18 kotet_meta_keys: 6 muvek_meta_keys: 5 proba_meta_keys: 1 terkeptar_meta_keys: 59 total-all-post-types: 97 distinct-meta-keys: amicus_document_id, mongo_document_id, cim, egysegesitett_cim, annotation, ...
host: http://localhost:9200 index_prefix: language: hu_HU per_page: 350 network_active: false
request_timeout: 5 index_document_timeout: 15 bulk_request_timeout: 30
health: yellow status: open index: wpteszt****hu-post-1 uuid: _ac-YxsgTKar7T41o_cc-g pri: 5 rep: 1 docs.count: 8 docs.deleted: 0 store.size: 117.4kb pri.store.size: 117.4kb total_fields_limit: 5000 analyzer_language: hungarian stop_language: hungarian snowball_language: Hungarian
method: WP Dashboard is_full_sync: Yes end_date_time: 2024/06/07 4:53:28 pm total_time: 0 hours, 0 minutes, 3 seconds total: 8 synced: 8 skipped: 0 failed: 0 errors: array ( ) trigger: manual final_status: success
active: true force_inactive: false
It has been 3 days since more information was requested from you in this issue and we have not heard back. This issue is now marked as stale and will be closed in 3 days, but if you have more information to add then please comment and the issue will stay open.
@felipeelia I have provided the feedback you had asked for.
@gyetger, as it depends on some 3rd party plugins, it may be hard to debug. I'll try to give it a look and share my findings here. Most likely, the problem comes from some code setting up the $post global variable and not setting it back. That could be a good starting point for you to debug it further.
@felipeelia Thank you. I tried a few more Elementor Widgets: Loop Grid, Posts. The result is the same, the page is indexed as the pod type. If I use the widget of the Pods plugin ("Pods - List Items"), then there is no problem.
@gyetger I'm able to reproduce the error using the Loop Grid widget even without using Pods. The problem is in Elementor Pro: it somehow sets the global $post
variable in a way that calling wp_reset_postdata()
won't set it properly again.
You can reproduce that by changing the render()
method of the \ElementorPro\Modules\Posts\Skins\Skin_Base
class. If you add global $post;
to its beginning and output that variable after the wp_reset_postdata()
call, it will still contain the post displayed inside the loop. Things will work properly if you add that global statement, then add $backup = $post;
right after it and just before the return, assign it back with $post = $backup;
. Of course, not a solution you will want to use, as you'd lose that change when they update the plugin again.
Unfortunately, there isn't much more we can do to help you with that problem. I recommend you open a ticket with the Elementor Pro team letting them know the problem. Hopefully, they can work around that.
Describe the bug
I have a Custom Post Type with the Pods plugin. Let's call it "Map". I have a page with an Elementor Widget (Portfolio) showing random Maps.
If I sync only the Maps to ElasticSearch, everything is fine. If I sync pages, too, the above said page gets indexed as one of the Map shown by the widget. The _id and the post_title is that of the page, but everything else comes from the Map, so I can't even exclude it by filtering the "post_type".
If only the Maps are synced, but I later modify the page with the Widget, it still gets indexed as a "map".
Steps to Reproduce
Screenshots, screen recording, code snippet
Environment information
No response
WordPress and ElasticPress information
WordPress
WordPress Environment
wp_version: 6.5.2 is_multisite: false theme: Hello Elementor (3.0.1) plugins: ElasticPress (5.0.2), Elementor (3.21.2), Elementor Pro (3.21.1), Pods - Custom Content Types and Fields (3.2.1)
Server Environment
php_version: 7.4.33 memory_limit: 1000M timeout: 30
Code of Conduct