0

I want to fix Joomla 4 Module with the error below

0 - Failed opening required 'C:\xampp\htdocs\she\plugins\system\articlescalendar/view/com_content/view..php' (include_path='C:\xampp\php\PEAR')

This is the code i think.


    function onAfterDispatch() {
        $app = JFactory::getApplication();
        if($app->isClient('admin')) return;
        
        if(isset($_REQUEST['K2ContentBuilder'])) return;

        $init_parameter = JFactory::getApplication()->input->getInt('calendar');
        if($init_parameter) {
            error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING & ~E_DEPRECATED & ~E_STRICT);
            
            $doc = JFactory::getDocument();
            
            $search_type = "com_content";
            $format = JFactory::getApplication()->input->getWord("search_mode");
            switch($search_type) {
                case "com_content" :
                    require_once(dirname(__FILE__)."/view/com_content/view.{$format}.php");
                    $view = new ArticlesViewCalendar;
                    $template = $view->display($search_type);
                break;
            }       
            $doc->setBuffer($template, "component");
        }
    }   

I change require_once(dirname(FILE)."/view/com_content/view.html.php"); and i get the next error. File exists in this path

0 - Failed opening required 'C:\xampp\htdocs\she/plugins/system/plg_articles_calendar/template/com_content/gsearch_blog.php' (include_path='C:\xampp\php\PEAR')

Fortys
  • 13
  • 3

0 Answers0