Problem with K2

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Tue Oct 08, 2013 7:04 am
Reply with quote
Report this post
I downloaded the new cloudhost template. When I started to work with it as administrator in a localhost installation. I noticed that in every opened K2 item I had error on top of my admin screen as follows:

Notice: Undefined property: stdClass::$rows in C:\xampp\htdocs\cloudhost\administrator\components\com_k2\models\extrafield.php on line 224
Notice: Undefined property: stdClass::$cols in C:\xampp\htdocs\cloudhost\administrator\components\com_k2\models\extrafield.php on line 225
Notice: Undefined property: stdClass::$rows in C:\xampp\htdocs\cloudhost\administrator\components\com_k2\models\extrafield.php on line 224
Notice: Undefined property: stdClass::$cols in C:\xampp\htdocs\cloudhost\administrator\components\com_k2\models\extrafield.php on line 225
Notice: Undefined property: stdClass::$rows in C:\xampp\htdocs\cloudhost\administrator\components\com_k2\models\extrafield.php on line 224
Notice: Undefined property: stdClass::$cols in C:\xampp\htdocs\cloudhost\administrator\components\com_k2\models\extrafield.php on line 225

Furthermore when I went to Components ...K2 ... Extra Fields or Components ...K2 ... Extra Field Groups I had again error:

An error has occurred.
500 Layout default not found
Return to Control Panel

Is that version of the template a working version in Joomla 3.x or not? Is there someone can help me to overcome both problems?

Thank you
Alexis
User avatar
Junior Boarder

GK User
Tue Oct 08, 2013 11:17 am
Reply with quote
Report this post
Firstly you should pay attention to joomla 3 requirements : )

In your php settings set following flag to off
Code: Select all
display_errors = Off


Check again if extra fields cause errors, if it does check following folder for extra fields and make sure they are all lowercase.

Code: Select all
administrator/components/com_k2/models/


Let us know how you get on.
User avatar
Platinum Boarder

GK User
Tue Oct 08, 2013 1:06 pm
Reply with quote
Report this post
I turned off Display Errors and now it is OK the K2 items, but the 500 Layout error exists: I sent you a screen shot of the administrator/components/com_k2/models/ folder.


Thank you
Alexis
User avatar
Junior Boarder

GK User
Tue Oct 08, 2013 1:12 pm
Reply with quote
Report this post
What is your joomla version as this seems to be joomla 3.1.4 bug and it is fixed in version 3.1.5 so update to latest joomla version 3.1.5 please.
User avatar
Platinum Boarder

GK User
Tue Oct 08, 2013 1:18 pm
Reply with quote
Report this post
I run the quickstart installation for the cloudhost template. Is that the latest Joomla version?
User avatar
Junior Boarder

GK User
Tue Oct 08, 2013 1:19 pm
Reply with quote
Report this post
No updates available
You already have the latest Joomla! version, 3.1.5.
User avatar
Junior Boarder

GK User
Tue Oct 08, 2013 1:34 pm
Reply with quote
Report this post
Seems they haven't fixed it.

Can you try below changes please until joomla updates this fix.

File: libraries/legacy/model/legacy.php
Line: 385 to 398 which is below
Code: Select all
   public function getName()
   {
      if (empty($this->name))
      {
         $r = null;
         if (!preg_match('/Model(.*)/i', get_class($this), $r))
         {
            throw new Exception(JText::_('JLIB_APPLICATION_ERROR_MODEL_GET_NAME'), 500);
         }
         $this->name = strtolower($r[1]);
      }

      return $this->name;
   }


Replace it with below
Code: Select all
   public function getName()
   {
      if (empty($this->_name))
      {
         $class = get_class($this);
         $pos   = strpos($class, 'View');

         if ($pos === false)
         {
            JError::raiseError(500, JText::_('JLIB_APPLICATION_ERROR_VIEW_GET_NAME'));
         }

         $tmp = strtolower(substr($class, ($pos + 4)));

         // Remove the format from the end of the string.
         $format = JFactory::getApplication()->input->get('format', 'html');
         $this->_name = preg_replace('/(' . strtolower($format) . ')$/', '', $tmp);
      }

      return $this->_name;
   }


Let me know how you get on.
User avatar
Platinum Boarder

GK User
Tue Oct 08, 2013 1:43 pm
Reply with quote
Report this post
normanUK wrote:Seems they haven't fixed it.

Can you try below changes please until joomla updates this fix.

File: libraries/legacy/model/legacy.php
Line: 385 to 398 which is below
Code: Select all
   public function getName()
   {
      if (empty($this->name))
      {
         $r = null;
         if (!preg_match('/Model(.*)/i', get_class($this), $r))
         {
            throw new Exception(JText::_('JLIB_APPLICATION_ERROR_MODEL_GET_NAME'), 500);
         }
         $this->name = strtolower($r[1]);
      }

      return $this->name;
   }


Replace it with below
Code: Select all
   public function getName()
   {
      if (empty($this->_name))
      {
         $class = get_class($this);
         $pos   = strpos($class, 'View');

         if ($pos === false)
         {
            JError::raiseError(500, JText::_('JLIB_APPLICATION_ERROR_VIEW_GET_NAME'));
         }

         $tmp = strtolower(substr($class, ($pos + 4)));

         // Remove the format from the end of the string.
         $format = JFactory::getApplication()->input->get('format', 'html');
         $this->_name = preg_replace('/(' . strtolower($format) . ')$/', '', $tmp);
      }

      return $this->_name;
   }


Let me know how you get on.


Now I got a GLOBAL error even on the Home Page:


500Oops, you've encountered an error

It appears the page you were looking for doesn't exist. Sorry about that.

Home Page | Contact Webmaster
User avatar
Junior Boarder

GK User
Tue Oct 08, 2013 2:09 pm
Reply with quote
Report this post
Revert back the changes for now, I ll test and get back to you.
User avatar
Platinum Boarder

GK User
Thu Oct 10, 2013 7:10 am
Reply with quote
Report this post
The problem with K2 is not resolved yet. I think that this is a serious problem with this template. Can you please inform me about the status of this bug?

Thank you
User avatar
Junior Boarder

GK User
Thu Oct 10, 2013 8:09 am
Reply with quote
Report this post
Download and install the fix on this page as well as more information on this bug.

https://www.gavick.com/documentation/ge ... mla-3-1-4/

See you around...
User avatar
Platinum Boarder


cron