Forum

Thread tagged as: Error

Fatal error on save

Hi,

I've just moved a perch 2.8.34 site from memset server to go daddy server. All seemed fine, site looked ok, admin looked ok, however on attempting to save anything, I get "the white screen" with the following error which I can't work out. Any ideas? The old site on memset has db driver: mysqli with php 5.4.21 and all works fine on the old server. The new server has db driver: PDO with php 7.1.7. Diagnostic summary below.

Fatal error: Uncaught Error: [] operator not supported for strings in /home/example/public_html/admin/core/lib/Textile.class.php:1548 Stack trace: #0 /home/example/public_html/admin/core/lib/Textile.class.php(2556): Netcarver\Textile\Parser->parseAttribsToArray('{color:#ffffff}') #1 [internal function]: Netcarver\Textile\Parser->fSpan(Array) #2 /home/example/public_html/admin/core/lib/Textile.class.php(2537): preg_replace_callback('/\n ...', Array, 'Please complete...') #3 /home/example/public_html/admin/core/lib/Textile.class.php(2490): Netcarver\Textile\Parser->spans('Please complete...') #4 /home/example/public_html/admin/core/lib/Textile.class.php(2376): Netcarver\Textile\Parser->graf('Please complete...') #5 /home/example/public_html/admin/core/lib/Textile.class.php(2239): Netcarver\Textile\Parser->fBlock(Array) #6 /home/example/public_html/admin/core/lib/Textile.class.php(1226): Netcarver\Textile\Parser->blocks('h1. Get started...') #7 /home/example/public_html/adm in /home/example/public_html/admin/core/lib/Textile.class.php on line 1548


Perch: 2.8.34, PHP: 7.1.7, MySQL: 5.6.36, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (2.8.34), assets (2.8.34), categories (2.8.34), perch_forms (1.8.3), perch_backup (1.2)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_forms', );
PERCH_LOGINPATH: /admin
PERCH_PATH: /home/example/public_html/admin
PERCH_CORE: /home/example/public_html/admin/core
PERCH_RESFILEPATH: /home/example/public_html/admin/resources
Image manipulation: GD Imagick
PHP limits: Max upload 8M, Max POST 8M, Memory: 128M, Total max file upload: 8M
F1: 6a33f95eca3667f9e0c39bf5ca2980fe
Resource folder writeable: Yes
SCRIPT_NAME: /admin/core/settings/diagnostics/index.php
REQUEST_URI: /admin/core/settings/diagnostics/
DOCUMENT_ROOT: /home/example/public_html

Jane Turnbull

Jane Turnbull 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Is there a <span> in the content?

Is it just this one region, or everywhere you're using Textile?

Yes - there is. There have been textile edits to do some colour formatting on the fly in certain sections.

%{color:#142c46}highlight me%

I've just checked sections that don't have spans and they are fine and save ok.

Drew McLellan

Drew McLellan 2638 points
Perch Support

That's what's causing the error in this case.

It's ok on the old server. I thought this was standard textile - Do I need to remove them all?

Drew McLellan

Drew McLellan 2638 points
Perch Support

It looks like it's a bug with the Textile library we're using - it was only fixed 22 days ago.

https://github.com/textile/php-textile/issues/175

I can obviously update the next version of Perch but I can't go back into the past and fix the version you're using. At the moment you'll need to stick with a lower PHP version or avoid the syntax.

Ok Drew. Thanks for that. We are planning to move to Perch 3 at some stage soon. In the meantime, we'll work around.

Drew McLellan

Drew McLellan 2638 points
Perch Support

It should be fixed in Perch 3.0.12 when that's available.