New Front EN › Support Forums › Ikebana Theme Support › Content of page, portfolio and post does is empty
- This topic has 6 replies, 2 voices, and was last updated 9 years ago by
rctorp.
-
AuthorPosts
-
August 4, 2015 at 10:12 am #6881
rctorp
MemberBackground:
– This is a blog on a multisite-installation.
– The only plugins that are Network-activated is “Multisite Enhancements”, “WordPress MU Domain Mapping” as well as “WooThemes Helper” and “WordPress Varnish”
– All other plugins are the one that came with Ikebana
– I have imported the testdata.… but whatever I do no content is shown on either page, post or portfolio.
Mainsite is http://dndbeta.no
Please help or advice :D
August 4, 2015 at 10:12 am #6882rctorp
Member(forgot to say; I’m using Versjon: 3.3)
August 4, 2015 at 10:17 am #6883satori
KeymasterHey Rctorp,
first of all, thank you for using Ikebana!
From the first glance it looks like there might be a function that filters the content template tag in an unwanted way, however, I will be able to tell more when we run some tests: the first thing I will need to ask you to do is to disable all plugins that are currently activated in the multisite installation, refresh the page, and see if the problem goes away; if it does, enable plugins one by one, checking the page in-between, in order to determine which plugin causes the content to disappear and let me know which one. In case the content doesn’t show even with all plugins off, please also let me know, we’ll troubleshoot further. Thanks!
Sincerely,
Andrii / Satori StudioAugust 4, 2015 at 11:13 am #6884rctorp
MemberThank you for a really quick feedback. I’ve asked the company that is hosting the site to look into the problem and try you suggested solution. I will let you know if we find a solution and what it is.
Christian
August 4, 2015 at 12:46 pm #6885rctorp
MemberOur host-provider has looked into the problem, disablet all plugins but with no success. (We have about 30 different sub-sites on the multisite and has never experienced this problem).
So what would you advice me to do?
August 4, 2015 at 1:55 pm #6886rctorp
MemberIt seems that the problem is related to the plugin shortcodes-pro, especially the filter that has been added to line 57 in the file
shortcodes-pro/inc/class-shortcodespro-type.phpThis calles the following functions:
function sp_do_shortcode( $content ) {
return $this->replace_do_shortcode( $content );
}* Searches and replaces up to 3 levels of [do] shortcode.
function replace_do_shortcode( $content ) {
// short shortcode
$pattern = ‘~\[do action\=\”[^\”]*\”\s?[^\]]*?\/]~’;
$content = preg_replace_callback( $pattern, array( &$this, ‘replace_do_shortcode_callback’ ), $content );// normal shortcode/no nesting
$pattern = ‘~\[do action\=\”[^\”]*\”\s?[^\]\/]*\]( [^\[\d\o\n]* )\[\/do\]~’;
$content = preg_replace_callback( $pattern, array( &$this, ‘replace_do_shortcode_callback’ ), $content );return $content;
}Since this plugin is part of the theme and the filter is in an anonymus object I had to search for it. Its probably not compatible to other PHP-versions.
As my host-provider tells me, this code ought to work if its add’ed to the sent-part in the init-action:
<?php
function dnd_fix_shortcode_filter() {
global $wp_filter;
$hook=’the_content’;
$found=0;
foreach($wp_filter[$hook] as $priority=>$record) {
foreach($record as $name => $values) {
if (strpos($name,’sp_do_shortcode’)>0) {
remove_filter($hook,$name,$priority);
$found=1;
break;
}
}
if($found) break;
}
}
?>————
The question is: This way of working around the problem is not something i prefer. In fact I ususally avoid it at all cost.Any advice?
August 6, 2015 at 10:38 am #6889rctorp
MemberGuess you are bussy.
I made my own plugin based on the above-mentioned code and now everything works perfectly
-
AuthorPosts
- You must be logged in to reply to this topic.