0

I am trying to get a site back up from an previous backup.
I have started with a clean installation of Joomla 1.5.2 so that I can upgrade to 1.7 & do the automated upgrade to current from there.
I have not touched the custom lp3 template code that will be upgraded to 1.7 template code during the upgrade.
yet, I am currently getting the following error when running the website:

Fatal error: Class 'ArtxContent' not found in /public_html/templates/lpl3/html/com_content/frontpage/default.php on line 6

==== snippet from default.php =====

<?php
defined('_JEXEC') or die;

require_once dirname(__FILE__) . str_replace('/', DIRECTORY_SEPARATOR, '/../../../functions.php');

$view = new ArtxContent($this);

echo $view->beginPageContainer('blog-featured');
if ($view->showPageHeading)
    echo $view->pageHeading();

if ($this->params->def('num_leading_articles', 1)) :
    $leadingcount = 0;
?>

===================================

The class file ArtxContent.php is located at /public_html/templates/lpl3/classes/ArtxContent.php and defined in the classes.php file...

==== snippet from classes.php =====

<?php
defined('_JEXEC') or die;

require_once dirname(__FILE__) . '/classes/ArtxPage.php';
require_once dirname(__FILE__) . '/classes/ArtxContent.php';
require_once dirname(__FILE__) . '/classes/ArtxContentArticleBase.php';
require_once dirname(__FILE__) . '/classes/ArtxContentArticle.php';
require_once dirname(__FILE__) . '/classes/ArtxContentItem.php';
require_once dirname(__FILE__) . '/classes/ArtxContentSectionItem.php';

===================================

Does anyone recognize the above error & how to fix it?

Thanks in advance,

Evans Craig

3
Contributors
11
Replies
38
Views
4 Years
Discussion Span
Last Post by ehcraig
0

The class file ArtxContent.php is located at /public_html/templates/lpl3/classes/ArtxContent.php and defined in the classes.php file...

You mean included in classes.php, yes? What is the path for classes.php?

0

Ok, the classes.php path is /public_html/templates/lpl3/classes.php
which is way above /public_html/templates/lpl3/html/com_content/frontpage/default.php
where the error is being called from.

0

That's fine. classes.php isn't even included from default.php, maybe it's included by functions.php or maybe a different file included by functions.php, etc. You should put the echo statement I mentioned at the top of classes.php to make sure the path it's returning is correct.

0

I did & it is returning:

/public_html/templates/lpl3/html/com_content/frontpage/classes/ArtxContent.php Fatal error: Class 'ArtxContent' not found in /public_html/templates/lpl3/html/com_content/frontpage/default.php on line 8

0

It doesn't look like it is in /public_html/templates/lpl3/fuctions.php

I searched it & found NO references to

function ArtxContent

anywhere in the file

0

Why is there a function called ArtxContent, it should be a class that you're looking for?

You can check if the file exists:

if(file_exists(...))echo "file exists";

Also class_exists:

if(class_exists("ArtxContent"))echo "class exists";

An error in require should halt all code and print the error to the screen if the file cannot be found, but you don't seem to be getting that error? In that case, it seems that the file at least is being 'included'.

Have you included or required the classes.php file before calling line 6:

$view = new ArtxContent($this);
0

Yes, no function call, a class call was needed, which I added.
I added the require_once & class_exist to default.php and NOW get a function error....

`/public_html/templates/lpl3/classes/ArtxContent.phpclass exists

Fatal error: Call to undefined function artxPost() in /public_html/templates/lpl3/classes/ArtxContentArticleBase.php on line 298
`

function artxPost is in the /public_html/templates/lpl3/functions.php file

    function artxPost($data)
    {
        if (is_string($data))
            $data = array('content' => $data);
        $classes = isset($data['classes']) && strlen($data['classes']) ? $data['classes'] : '';
        artxFragmentBegin(str_replace('class="mp-box mp-post">', 'class="mp-box mp-post' . $classes . '">', "<div class=\"mp-box mp-post\">\r\n    <div class=\"mp-box-body mp-post-body\">\r\n<div class=\"mp-post-inner\">\r\n"));
        artxFragmentBegin("<h2 class=\"mp-postheader\">");
        artxFragmentBegin("");
        if (isset($data['header-text']) && strlen($data['header-text'])) {
            if (isset($data['header-link']) && strlen($data['header-link']))
                artxFragmentContent('<a href="' . $data['header-link'] . '" class="PostHeader">' . $data['header-text'] . '</a>');
            else
                artxFragmentContent($data['header-text']);
        }
        artxFragmentEnd("\r\n");
        artxFragmentEnd("</h2>\r\n");
        artxFragmentBegin("<div class=\"mp-postcontent\">\r\n");
        if (isset($data['content']) && strlen($data['content']))
            artxFragmentContent(artxPostprocessPostContent($data['content']));
        artxFragmentEnd("\r\n</div>\r\n<div class=\"cleared\"></div>\r\n");
        return artxFragmentEnd("\r\n</div>\r\n\r\n       <div class=\"cleared\"></div>\r\n    </div>\r\n</div>\r\n", '', true);
    }

Edited by ehcraig: picky

0

is the class trying to access an external function?

0

Yes, it seems to be the only function called from the /public_html/templates/lpl3/functions.php
all the others used, are within the /public_html/templates/lpl3/classes/ArtxContentArticleBase.php

0

I included the functions.php within ArtxContentArticleBase.php , but now I am getting errors as functions.php calls classes that have functions within functions.php.

So now the errors are circular??

`Warning: include_once(/public_html/templates/lpl3/classes/functions.php) [function.include-once]: failed to open stream: No such file or directory in /public_html/templates/lpl3/classes/ArtxContentArticleBase.php on line 7

`Warning: include_once() [function.include]: Failed opening '/public_html/templates/lpl3/classes/functions.php' for inclusion (include_path='.:/usr/local/lib/php-5.2.17/lib/php') in /public_html/templates/lpl3/classes/ArtxContentArticleBase.php on line 7

Fatal error: Call to undefined function artxPost() in /public_html/templates/lpl3/classes/ArtxContentArticleBase.php on line 305

This whole template seems to be lost.
Everytime I get one part going again, it cannot find a class or another function??

Here is the structure of folder 'lpl3':

<folder> classes
<folder> css
<folder> html
<folder> images
<folder> joomla_images
classes.php
component.php
functions.php
index.php

The original errors that started in the html folders, is now in the classes folder????

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.