7 Posts
SparksArts
6 years ago
Topic

After updating StackIdeas' EasyBlog component from version 5.0.44 to 5.1.5, the blog page on frontend returns "Error: 0 - Call to a member function set() on string" 

I disabled some plugins and found when I disable Content - SEBLOD plugin the blog page works as expected.

Support ticket with StackIdeas suggests the Content - SEBLOD plugin code doesn't add a proper check whether the param really received the value or not. See StackIdeas forum post at https://stackideas.com/forums/easyblog-5-1-x-conflict-with-seblod-content-plugin#reply-332296

In /plugins/content/cck/cck.php :

public function onContentBeforeDisplay( $context, &$article, &$params, $limitstart = 0 )
{
        if ( JCck::getConfig_Param( 'hide_edit_icon', 0 ) ) {
                  if (isset($article->params)) {
                      $article->params->set( 'access-edit', false ); 
                   }
       }
       return '';
}

Replace with the following fixes the problem:

public function onContentBeforeDisplay( $context, &$article, &$params, $limitstart = 0 )
{
        if ( JCck::getConfig_Param( 'hide_edit_icon', 0 ) ) {
                 

                   if (isset($article->params) && $article->params) {

                      $article->params->set( 'access-edit', false ); 
                   }
       }
       return '';
}

Is this a bug in this SEBLOD plugin? Will this hack break other SEBLOD functionality? This hack is the only solution I've found to make EasyBlog 5.1.5 work with SEBLOD 3.10.0.

StackIdeas suggested I pass this issue and possible solution on to you.

Thanks, Richard

Get a Book for SEBLOD
4229 Posts
Kadministrator
6 years ago
3
Level 1

Hi,

this won't break any functionality, it just adds a check if params are not empty. Please report this on github tracker so we can add it to the next release.

7 Posts
SparksArts
6 years ago
2
Level 2

This has been submitted to github tracker - issue #382 - at https://github.com/Octopoos/SEBLOD/issues/382

Richard

4229 Posts
Kadministrator
6 years ago
1
Level 3

Thnx

7 Posts
SparksArts
6 years ago
0
Level 4

Solution has been provided on the github tacker. I tested the modified code and it works for me. EasyBlog pages now display correctly.

Get a VIP membership