@malihu Cache clear has been done many times
Plugin Author
malihu
(@malihu)
Make one last test:
In plugin file editor select “Page scroll to id”. Comment all lines from 388 to 399 like this:
/* $instances_count=(is_array($instances) || $instances instanceof Countable) ? count($instances) : 1;
for($i=1; $i<=count($instances_count); $i++){
$pl_shortcodes[]='pl_shortcode_fn_'.$i;
$pl_shortcodes_b[]='pl_shortcode_fn_'.$i;
// --edit--
$tag=$shortcode_class=$this->sc_pfx; // Shortcode without suffix
$tag_b=$this->sc_pfx.'_wrap'; // Shortcode without suffix
//$tag=$shortcode_class=$this->sc_pfx.'_'.$i; // Shortcode with suffix
include_once(
plugin_dir_path( __FILE__ ).(version_compare(PHP_VERSION, '5.3', '<') ? 'includes/malihu-pagescroll2id-shortcodes-php52.php' : 'includes/malihu-pagescroll2id-shortcodes.php')
);
} */
Save, test and let me know if the error is there and if it still says about 388 line.
@malihu Thank you so much, we have comment the lines from 388 to 399 and now the site works fine.
Plugin Author
malihu
(@malihu)
@sharonbeyond No problem 🙂
Try one more test please:
Replace the commented code (lines from 388 to 399) to:
for($i=1; $i<=count((array)$instances); $i++){
$pl_shortcodes[]='pl_shortcode_fn_'.$i;
$pl_shortcodes_b[]='pl_shortcode_fn_'.$i;
// --edit--
$tag=$shortcode_class=$this->sc_pfx; // Shortcode without suffix
$tag_b=$this->sc_pfx.'_wrap'; // Shortcode without suffix
//$tag=$shortcode_class=$this->sc_pfx.'_'.$i; // Shortcode with suffix
include_once(
plugin_dir_path( __FILE__ ).(version_compare(PHP_VERSION, '5.3', '<') ? 'includes/malihu-pagescroll2id-shortcodes-php52.php' : 'includes/malihu-pagescroll2id-shortcodes.php')
);
}
Save, test and let me know.
OK I WILL TRY THIS AND LET YOU KNOW HOW IT WORKS
@malihu This the same code has been used before and this codes only has been commented
Plugin Author
malihu
(@malihu)
It’s not exactly the same code. The first line is different:
for($i=1; $i<=count((array)$instances); $i++){
Plugin Author
malihu
(@malihu)
The function should be exactly like this:
public function add_plugin_shortcode(){
$pl_shortcodes=array();
$pl_shortcodes_b=array();
$instances=get_option($this->db_prefix.'instances');
for($i=1; $i<=count((array)$instances); $i++){
$pl_shortcodes[]='pl_shortcode_fn_'.$i;
$pl_shortcodes_b[]='pl_shortcode_fn_'.$i;
// --edit--
$tag=$shortcode_class=$this->sc_pfx; // Shortcode without suffix
$tag_b=$this->sc_pfx.'_wrap'; // Shortcode without suffix
//$tag=$shortcode_class=$this->sc_pfx.'_'.$i; // Shortcode with suffix
include_once(
plugin_dir_path( __FILE__ ).(version_compare(PHP_VERSION, '5.3', '<') ? 'includes/malihu-pagescroll2id-shortcodes-php52.php' : 'includes/malihu-pagescroll2id-shortcodes.php')
);
}
}