1
wingrider101
Article 1.00 Final Problem - Blank Home Page when Blocks Turned On

Hello all,

I've run into an interesting one that has got me scratching my head. I've read the blank page FAQ, and I've checked for that, but I'm having a weird problem I can't figure out. Any help would be appreciated.

Configuration:

XOOPS Version: XOOPS 2.0.17.1
XOOPS Theme: default
XOOPS Template Set: default
PHP Version: 5.2.4
MySQL Version: 5.0.45-community-nt
Server Software: Apache/2.2.6 (Win32) DAV/2 mod_ssl/2.2.6 OpenSSL/0.9.8e mod_autoindex_color PHP/5.2.4
User's Browser: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11

Problem Symptoms:

With the Article 1.00 Final module installed (new install), and with blocks from the module (any of them) set for the Top Page, when logging into the URL of the Home Page (or Top Page) all that is displayed is a blank page, indicating an aborted script. Setting the block(s) to display on the Article module pages works fine. Returning the blocks to the Top Page (or adding Top Page to config) will immediately blank the home page again.

Debug Mode Error Codes:

Fatal error: Call to undefined function art_formatTimestamp() in D:\xampp\htdocs\modules\article\include\functions.parse.php(133) : eval()'d code on line 140
All errors (4) queries (109) blocks (31) extra (0) timers (4)

Code from that section (Line 140 -2 and +2):

Quote:

* Function to parse links, links are delimited by link break, URL and title of a link are delimited by space
*
* @var string $text raw content
*
* @return array associative array of link url and title


Obviously, this is comment code, so the error is being reported on the wrong line. I can't figure out whether the function above the comment is broken, or the one below it.

Any help would be appreciated. This is a great module, but I really NEED the blocks to work on the Home Page. Thanks in advance all you Xoopsers!

Byron
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Byron McKay
wingrider101 at gmail dot com
http://byron.homelinux.com
http://www.xoopstyro.com
-------------------------------------
Xoops CMS Intranet sites for Business
-------------------------------------

2
DarinAllan
Re: Article 1.00 Final Problem - Blank Home Page when Blocks Turned On

I really don't understand errors lol, let me say that straight up ;o)

But you haven't mentioned if you have the latest Frameworks and Xoopseditor packages installed

Frameworks & Xoopseditor info

;o)

3
iHackCode
Re: Article 1.00 Final Problem - Blank Home Page when Blocks Turned On

are there any other error messages.. that is weird that you are getting that error. since that function is included about 10 lines before it's called.

ill test it out on php 5.2.4 tomorrow.
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

4
wingrider101
Re: Article 1.00 Final Problem - Blank Home Page when Blocks Turned On

Quote:

DarinAllan wrote:
I really don't understand errors lol, let me say that straight up ;o)

But you haven't mentioned if you have the latest Frameworks and Xoopseditor packages installed

Frameworks & Xoopseditor info

;o)


Yup.. I'm on the latest. Upgraded to try and fix the problem. No joy...
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Byron McKay
wingrider101 at gmail dot com
http://byron.homelinux.com
http://www.xoopstyro.com
-------------------------------------
Xoops CMS Intranet sites for Business
-------------------------------------

5
wingrider101
Re: Article 1.00 Final Problem - Blank Home Page when Blocks Turned On

Quote:

Bandit-X wrote:
are there any other error messages.. that is weird that you are getting that error. since that function is included about 10 lines before it's called.

ill test it out on php 5.2.4 tomorrow.


Nope... no other errors. Just a blank page. It's on an intranet site, or I'd give you a URL to look at it. It's a wierd one... I saw the function above where it says the error occurs, but I couldn't see anything wrong with it. Dunno..
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Byron McKay
wingrider101 at gmail dot com
http://byron.homelinux.com
http://www.xoopstyro.com
-------------------------------------
Xoops CMS Intranet sites for Business
-------------------------------------

6
BlueStocking
Re: Article 1.00 Final Problem - Blank Home Page when Blocks Turned On

lines 104 - 135

/**
 * Function to parse function prefix
 * 
 * @var string     $function_string    string to be parsed
 * @var mixed     $pattern
 * @var mixed     $replacement
 *
 * @return bool    true on success
 */
function art_parse_function($function_string$pattern ""$replacement "")
{
    if(empty(
$function_string)) return;
    
$patterns = array("/[DIRNAME]/""/[VAR_PREFIX]/");
    
$replacements = array($GLOBALS["artdirname"], $GLOBALS["ART_VAR_PREFIX"]);
    if(!empty(
$pattern) && !is_array($pattern) && !is_array($replacement)){
        
$pattern = array($pattern);
        
$replacement = array($replacement);
    }
    if(
is_array($pattern) && count($pattern)>0){
        
$ii 0;
        foreach(
$pattern as $pat){
            if(!
in_array($pat$patterns)){
                
$patterns[] = $pat;
                
$replacements[] = isset($replacement[$ii])?$replacement[$ii]:"";
            }
            
$ii++;
        }
    }
    
$function_string preg_replace($patterns$replacements$function_string);
    eval(
$function_string);
    return 
true;
}

Relevant code...
Lines 136 to 165
/**
 * Function to parse links, links are delimited by link break, URL and title of a link are delimited by space
 * 
 * @var string     $text raw content
 *
 * @return array    associative array of link url and title
 */
function &art_parseLinks($text)
{
    
$myts =& MyTextSanitizer::getInstance();
    
$link_array preg_split("/(rn|r|n)( *)/"$text);
    
$links = array();
    if(
count($link_array)>0) foreach($link_array as $link){
        @list(
$url$title) = array_map("trim",preg_split("/ /"$link2));
        if(empty(
$url)) continue;
        if(empty(
$title)) $title $url;
        
$links[] = array(
            
"url"    => $url
            
"title"    => $myts->htmlSpecialChars($title)
            );
    }
    return 
$links;
}

ENDIF;
?>


NOTE:Line 31 to 34
/* known issues:
 * - "/" in a string 
 * - "&" in a string 
*/


ADDON:
Would like to see a copy of what your URL looks like since you said it was odd....
Just curious.
https://xoops.org/modules/repository .. It is time to get involved - XOOPS.ORG

7
wizanda
Re: Article 1.00 Final Problem - Blank Home Page when Blocks Turned On
  • 2007/12/20 22:47

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


It's not that code in question, for some reason its not loading the include/functions.time.php which contains the function art_formatTimestamp....How to fix it without looking further, unsure....yet My home copy is on PHP5, my site PHP4 and works fine....

8
iHackCode
Re: Article 1.00 Final Problem - Blank Home Page when Blocks Turned On

can you reupload the article\blocks\blocks.news.php file to your site or send me a copy of that file.
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

Login

Who's Online

187 user(s) are online (115 user(s) are browsing Support Forums)


Members: 0


Guests: 187


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits