1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

I have problem with adding articles into pages

Discussion in 'Joomla' started by richardm55, Dec 30, 2012.

  1. #1
    I have been working for my new website for last couples of days. I have chosen the free template which is tk_gen_free_II downloaded from website http://themekat.com/. I have configured header and footer attaching all icons but I have started to add the articles in main contain I got such following message which appears just before article:

    Strict Standards: Non-static method JSite::getMenu() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\joomla25\templates\tk_gen_free_ii\warp\systems\joomla\layouts\com_content\article\default.php on line 13

    Strict Standards: Non-static method JApplication::getMenu() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\joomla25\includes\application.php on line 539

    and I don't know what to do now. Any suggestions?
     
    richardm55, Dec 30, 2012 IP
  2. ragamsky

    ragamsky Active Member

    Messages:
    191
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #2
    People who owned a problem with a code without share what they do on a code is a moron..
     
    ragamsky, Dec 30, 2012 IP
  3. richardm55

    richardm55 Active Member

    Messages:
    762
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    65
    #3
    I can not show the code because I run my website on local server. But I can copy longer bit of codes taken from those files
    This is the first part of code dealing with the first message:
    <?php
    /**
    * @package Warp Theme Framework
    * @author YOOtheme http://www.yootheme.com
    * @copyright Copyright (C) YOOtheme GmbH
    * @license http://www.gnu.org/licenses/gpl.html GNU/GPL
    */

    // no direct access
    defined('_JEXEC') or die;

    // get view
    $menu = JSite::getMenu()->getActive(); //this that line 13
    $view = is_object($menu) && isset($menu->query['view']) ? $menu->query['view'] : null;

    JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');

    // Create shortcuts to some parameters.
    $params = $this->item->params;
    $images = json_decode($this->item->images);
    $urls = json_decode($this->item->urls);
    $canEdit = $this->item->params->get('access-edit');
    $user = JFactory::getUser();





    And another part of code taken from the file dealing with second error message:
    * Return a reference to the JPathway object.
    *
    * @param string $name The name of the application/client.
    * @param array $options An optional associative array of configuration settings.
    *
    * @return object JMenu.
    * @since 1.5
    */
    public function getMenu($name = null, $options = array())
    {
    $options = array();
    $menu = parent::getMenu('site', $options); //This is line 539
    return $menu;
    }

    /**
    * Return a reference to the JPathway object.
    *
    * @param string $name The name of the application.
    * @param array $options An optional associative array of configuration settings.
    *
    * @return object JPathway.
    * @since
     
    Last edited: Dec 31, 2012
    richardm55, Dec 31, 2012 IP
  4. richardm55

    richardm55 Active Member

    Messages:
    762
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    65
    #4
    I have partly solved this problem and I have switched off appearing error message Strict Standards. I have found that "Strict Standards" isn't technically an error, it's saying that the Joomla version you installed isn't strictly adhering to PHP standards. What you want to do is two things: first, restrict error reporting in php.ini to not report a standards violation as an error, then (when you're ready for go-live), turn off Joomla error reporting.
    In your php.ini, change error_reporting = E_ALL | E_STRICT to error_reporting = E_ALL & ~E_NOTICE
    If you have no access to server and file php.ini so there is another solution for this.
    Create .htaccess file with code:

    # supress php errors
    php_flag display_startup_errors off
    php_flag display_errors off
    php_flag html_errors off
    php_value docref_root 0
    php_value docref_ext 0

    and place that file in root joomla directory.

    And I have also noticed that that error message turns up only for free templates from http://themekat.com/ and does not come up with using other templates.
     
    richardm55, Jan 1, 2013 IP