Same warning message showing up here. The PHP function must have changed to be slightly more strict in 5.5. Please update the plugin. I tried to get you the exact code that needs changing but regex is not my strong suit.
Windows
WampServer 2.5
PHP 5.5.12
Apache 2.4.9
WordPress 3.9.1
Shortcodes Pro 1.1.5
Changing the line to
$pattern = ‘~\[do action\=\”[^\”]*\”\s?[^\]\/]*\]( [^\[\do\n]* )\[\/do\]~’;
This would solve the problem!
Hi there,
I’m having this same issue. Bear with me – I’m not exactly a coding pro, but I’m very familiar with WordPress. Has anyone discovered a concrete resolution to this problem? Will changing the original line problem to this:
$pattern = ‘~\[do action\=\”[^\”]*\”\s?[^\]\/]*\]( [^\[\do\n]* )\[\/do\]~’;
solve the problem? If so, where can I locate how to edit that line?
Thanks.
Meu site está inacessível ao público.
Esta é a mensagem que surge nos artigos, menus e widgets do site nas tentativas de acesso público:
Warning: preg_replace_callback() [function.preg-replace-callback]: Compilation failed: missing opening brace after \o at offset 45 in /home/queroema/public_html/wp-content/plugins/shortcodes-pro/inc/class-shortcodespro-base.php on line 57.
No Cpanel do site afetado está assim:
Linha 56: $pattern = ‘~\[do action\=\”[^\”]*\”\s?[^\]\/]*\]( [^\[\d\o\n]* )\[\/do\]~’;
Linha 57: $content = preg_replace_callback( $pattern, array( &$this, ‘replace_do_shortcode_callback’ ), $content );
Afinal onde está o erro (qual linha deve ser alterada), e como corrigi-lo?
O Problema acima foi resolvido com a alteração do código na linha 56.
Alterar em: CPanel>public_html>wp-content>plugins>shortcodespro>inc>class-shortcodespro-base.php
$pattern = ‘~\[do action\=\”[^\”]*\”\s?[^\]\/]*\]( [^\[\do\n]* )\[\/do\]~’;
Exatamente como está. Funciona bem.
==============================
~~~~ SOLVED ~~~~
==============================
pazis, solved the error issue.
It’s a great plugin.
Replace or comment out // Line 56 on the “class-shortcodespro-base.php” file and add the replacement code.
~~~~~~ File Location:
wp-content > plugins > shortcodes-pro > inc > class-shortcodespro-base.php
$pattern = '~\[do action\=\"[^\"]*\"\s?[^\]\/]*\]( [^\[\do\n]* )\[\/do\]~';
Ex. Here’s what I did….
// normal shortcode/no nesting
//$pattern = '~\[do action\=\"[^\"]*\"\s?[^\]\/]*\]( [^\[\d\o\n]* )\[\/do\]~';
$pattern = '~\[do action\=\"[^\"]*\"\s?[^\]\/]*\]( [^\[\do\n]* )\[\/do\]~';
$content = preg_replace_callback( $pattern, array( &$this, 'replace_do_shortcode_callback' ), $content );
return $content;
}
Shortcodes Pro seems to be essentially extinct now. My own client’s sites didn’t really suffer until their hosting updated to php 5.4 recently, and then this same error appeared.
Looking at the entry for Shortcodes Pro in the /admin page under Plugins, one can see that the plugin has not been updated for at least 3 years and that it has received some comments about not being compatible with even WordPress 4, not to mention later minor versions.
Worse, the link from the /admin page under Plugins to the plugin author’s site is broken. In fact, even the author’s domain, mattvarone.com, is no longer working.
I can’t see continuing with the use of this plugin. But to be perfectly honest, this is where all use of WordPress ends up eventually, with one plugin after another failing and/or going out of support.
@ drjonesy
You are my man. With the latest php5-fpm shortcodes pro crashed my site. With your workarround all is again working fine. Thanks alot