10 years ago
0
Topic

Hi all,

I am testing Seblod (multisites) on my local machine using Xampp 1.7.3 and Joomla 2.5.11.

On the frontpage of the first site when I open a modal window and I get the following notice: Trying to get property of non-object in C:\xampp\htdocs\responsive3\plugins\system\cck\cck.php on line 296

Checking the code I found that at this time the active menu is not set. So here is my workaround:

.....
        } elseif ( $this->site_cfg->get( 'set_template_style', false ) ) {
           $menu   =   $app->getMenu();
           if ( is_object( $menu ) ) {
//             $style   =   $menu->getActive()->template_style_id;   --> this line gave the notice (line 296)
//             if ( $style ) {
//               $this->_setTemplateStyle( $style );
//             }
// workaround start
             $active = $menu->getActive();
             if (isset($active)) {     // check if set
               $style   = $active->template_style_id;
               $this->_setTemplateStyle( $style );
             }
// workaround end
....

Best regards,
Michael

Get a Book for SEBLOD