WPIntell

Source evidence

Wrong upload folder

Block Editor Colors · support · 2024-06-13T21:51:00+00:00

neutralsentiment
mediumseverity
0.53relevance
2replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

5 / 26 rows with source links

19.2% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

21 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
lukechinworth resolved
With Block Editor Colors plugin active, when we upload to the media library the file is being put in an old folder (2023/03, current date is 2024/06). This is because get_post(0) is returning the first block_editor_color likely due to global $post polution. We determined this was caused by the WP_Query in CustomColorsService.php set_colors. I see the wp_reset_postdata() after the loop, but for some reason it’s not reseting it. Can you change the WP_Query to get_posts to avoid this issue? private function set_colors() { $args = array( 'post_type' => $this->color_cpt_slug, 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => -1 ); $posts = get_posts( $args ); $colors = []; $disabled_colors = []; foreach($posts as $post) { if ( $post->post_status === 'publish' ) { $colors[ $post->ID ] = [ 'name' => $post->post_title, 'slug' => get_post_meta( $post->ID, 'slug', true ), 'color' => get_post_meta( $post->ID, 'color', true ), ]; } else { $disabled_colors[ $post->ID ] = [ 'name' => $post->post_title, 'slug' => get_post_meta( $post->ID, 'slug', true ), 'color' => get_post_meta( $post->ID, 'color', true ), ]; } } $this->custom_colors = $colors; $this->disabled_custom_colors = $disabled_colors; } Hello there! I apologize for the delayed response. I wanted to let you know that I have replicated the issue on my end and have escalated it to our developers. I’m hopeful that they will implement a solution in the next plugin release. We inform you as soon as we have any updates on this matter. Hello there! I hope you’re doing well. I’m pleased to announce that the Block Editor Colors plugin version 1.2.6 has been released. In this version, we have fixed the issues related to the incorrect media upload folder. So update the plugin and let us know if there’s something we can help you with.

Comments

2 shown
Eugene White 2024-06-20T14:39:00+00:00

Hello there! I apologize for the delayed response. I wanted to let you know that I have replicated the issue on my end and have escalated it to our developers. I’m hopeful that they will implement a solution in the next plugin release. We inform you as soon as we have any updates on this matter.

Eugene White 2024-06-21T15:18:00+00:00

Hello there! I hope you’re doing well. I’m pleased to announce that the Block Editor Colors plugin version 1.2.6 has been released. In this version, we have fixed the issues related to the incorrect media upload folder. So update the plugin and let us know if there’s something we can help you with.