Home>Support>Prebuilt layout import fails because of an em-dash

Prebuilt layout import fails because of an em-dash

Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].

First of all, I want to say that I really love Page Builder and really enjoy using it. It is a very nice tool indeed!

However, I’ve noticed a strange issue: if a prebuilt layout’s cell contains an em-dash (a long dash character) it hangs when trying to apply a prebuilt layout to the page.

When this error happens, JavaScript console shows the following error:

TypeError: e is null
[7]</t.exports<.loadSelectedLayout/<()
 siteorigin-panels-24.min.js:1
bound ()
 self-hosted:756
n.Callbacks/i()
 jquery.js:2
n.Callbacks/j.fireWith()
 jquery.js:2
y()
 jquery.js:4
.send/c()

at siteorigin-panels-24.min.js:1:12682.

How to reproduce:
1. Insert a prebuilt layout provided below into a functions.php file.
2. Open a page in a WP page editor.
3. Switch to using a Page Builder.
4. Hit ‘Prebuilt’ button.
5. From the list of layouts choose the test one.
Then the system hangs and nothing happens.

Here is the layout that can be used to reproduce the error:

$layouts['test-page'] = array(
'name' => __('Test page', 'theme'),    // Required
'description' => __('', 'theme'),    // Optional
'widgets' =>
	array (
		0 =>
			array (
				'title' => '',
				'text' => '—

',
				'text_selected_editor' => 'tinymce',
				'autop' => true,
				'_sow_form_id' => '5768fe774e40b',
				'panels_info' =>
					array (
						'class' => 'SiteOrigin_Widget_Editor_Widget',
						'grid' => 0,
						'cell' => 0,
						'id' => 0,
						'widget_id' => 'f89cf0e3-aa98-40c9-8526-255ee63413f8',
						'style' =>
							array (
								'background_image_attachment' => false,
								'background_display' => 'tile',
							),
					),
			),
	),
'grids' =>
	array (
		0 =>
			array (
				'cells' => 1,
				'style' =>
					array (
					),
			),
	),
'grid_cells' =>
	array (
		0 =>
			array (
				'grid' => 0,
				'weight' => 1,
			),
	),
);

The text that causes the problem is an em-dash inside a ‘text’ field value. If replaced with some other character, it works just fine. So it looks like it does not like em-dash for some reason.

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 9 years, 22 days ago Andrew Misplon
    Hi, I Work Here

    Hi Kirlat

    Thanks for your support and for the detailed bug report, it’s most appreciated.. I’ll log this shortly for our developers to attend to.

  2. 9 years, 14 days ago Greg Priday
    Hi, I Work Here

    Hi Kirlat

    Thanks for letting us know about the issue. I can’t seem to recreate it on my side. Everything is working as expected. I’ve tested your layout with both Chrome and Firefox.

    Which browser are you testing on? Are you using any other plugins at the same time?

  3. 9 years, 14 days ago kirlat

    Hi Greg!

    It fails for me in both Firefox 47.0 and Chrome 51.0.2704.106 m on Windows. There were no active plugins during my testing except for Page Builder and SiteOrigin widgets bundle. The site is running on WP 4.5.3. It does not work on both my local dev server running on VVV Vagrant image (Ubuntu based) inside a VM and on a remote server on a commercial hosting. It also fails with both my custom theme and Twentysixteen.

    It just asks whether I want to replace an existing layout or not and then hangs indefinitely.

    If you cannot reproduce that, I can send you a server snapshot created with a Duplicatior (https://wordpress.org/plugins/duplicator/) plugin or setup a remote server I can provide temporary access to you. In letter case please let me know how to pass you the server credentials safely.

    Best regards,
    Kir

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More