From c39e4831158c9aecc9343dd6f17a74c1379519c7 Mon Sep 17 00:00:00 2001 From: Nichita Date: Thu, 12 Dec 2024 14:03:04 +0200 Subject: [PATCH] Layout template not loading corect page in Brizy WP --- brizy.php | 2 +- editor/editor/editor.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/brizy.php b/brizy.php index 5c8346a8d9..922e0b0d66 100755 --- a/brizy.php +++ b/brizy.php @@ -17,7 +17,7 @@ $_SERVER['HTTPS'] = 'on'; } -define('BRIZY_DEVELOPMENT', false ); +define('BRIZY_DEVELOPMENT', true ); define('BRIZY_LOG', false ); define('BRIZY_VERSION', '2.6.3'); define('BRIZY_MINIMUM_PRO_VERSION', '2.4.15'); diff --git a/editor/editor/editor.php b/editor/editor/editor.php index 9a61556d7d..988f5779e3 100755 --- a/editor/editor/editor.php +++ b/editor/editor/editor.php @@ -402,10 +402,10 @@ private function getApiConfigFields( $config, $context ) { 'fileUrl' => home_url( '?' . Brizy_Editor::prefix( '_attachment' ) . '=' ), ], 'templates' => [ - 'layoutsChunkUrl' => Brizy_Config::LAYOUTS_CHUNK_URL, + 'layoutsChunkUrl' => 'https://phplaravel-1109775-4184176.cloudwaysapps.com/api/get-layouts-chunk', 'layoutsPagesUrl' => Brizy_Config::LAYOUTS_PAGES_URL, - 'layoutDataUrl' => Brizy_Config::LAYOUTS_PAGE_DATA_URL, - 'blocksChunkUrl' => Brizy_Config::BLOCKS_CHUNK_URL, + 'layoutDataUrl' => 'https://phplaravel-1109775-4184176.cloudwaysapps.com/api/get-layouts-page', + 'blocksChunkUrl' => 'https://phplaravel-1109775-4184176.cloudwaysapps.com/api/get-kit-collections-chunk', 'blocksKitsUrl' => Brizy_Config::BLOCKS_KITS_URL, 'blocksDataUrl' => Brizy_Config::BLOCKS_DATA_URL, 'popupsChunkUrl' => Brizy_Config::POPUPS_CHUNK_URL, @@ -1003,10 +1003,10 @@ private function addGlobalBlocksData( $config ) { */ private function get_page_attachments() { global $wpdb; - $query = $wpdb->prepare( "SELECT + $query = $wpdb->prepare( "SELECT pm.* - FROM - {$wpdb->prefix}postmeta pm + FROM + {$wpdb->prefix}postmeta pm JOIN {$wpdb->prefix}postmeta pm2 ON pm2.post_id=pm.post_id AND pm2.meta_key='brizy_post_uid' AND pm2.meta_value=%s WHERE pm.meta_key='brizy_attachment_uid' GROUP BY pm.post_id", $this->post->getUid() );