Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 05:38:49 PM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155544 Posts in 21714 Topics by 7736 Members
Latest Member: chris85
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Error in sitemap module?  (Read 481 times)
D. Peeters

Offline Offline

Posts: 128


« on: May 02, 2011, 06:12:43 PM »

Dear all,

I just made another template for my website, but the sitemap module doesn't work anymore... The page loads until where the sitemap starts... I got the following error:

Fatal error: Cannot redeclare sitemap() (previously declared in /mnt/web5/htdocs/modules/sitemap/view.php:86) in /mnt/web5/htdocs/modules/sitemap/view.php on line 123

Do you guys know what to do?

Thanks!!
Logged
Ruud
WebsiteBaker Org e.V.

Offline Offline

Posts: 2297



WWW
« Reply #1 on: May 02, 2011, 09:36:53 PM »

This typically is an error if you add a module twice to a single page, or you are using something else that defines the function sitemap().
Logged

Professional WebsiteBaker Solutions
Paul - Westhouse IT

Offline Offline

Posts: 63


WWW
« Reply #2 on: May 02, 2011, 11:05:01 PM »

Which version of the module are you using? And which version of WB?
Logged

Westhouse IT - Professional WebsiteBaker developers for hire.
D. Peeters

Offline Offline

Posts: 128


« Reply #3 on: May 03, 2011, 10:04:19 AM »

Module: v3.1
WB: v2.8.1

This typically is an error if you add a module twice to a single page, or you are using something else that defines the function sitemap().
>I only use the sitemap module once on only one page!


huh huh

Logged
DarkViper
Development Team
*****
Offline Offline

Posts: 1253


« Reply #4 on: May 03, 2011, 11:35:15 AM »

a'm sure that you use another module, snippet, droplet or something else which also provides a function named 'sitemap()'. This is the only way to get a 'redeclare error'.
Logged

Anleitungen lesen und selber nachdenken ist anstrengend...  Da lass ich doch lieber andere für mich denken...

In 1984:  Nineteen Eighty-Four is a unrealistic utopia!!
In 2012:  Nineteen Eighty-Four is a little piece only of our reality!!
D. Peeters

Offline Offline

Posts: 128


« Reply #5 on: May 03, 2011, 06:54:52 PM »

I discovered I made a mistake... I used the following script on the website
Code:
<?php
 
       ob_start(); 
    page_content(1); 
    $content1=ob_get_contents();  
    ob_end_clean(); 

        ob_start(); 
    page_content(2); 
    $content2=ob_get_contents();  
    ob_end_clean(); 

if ($content2=="") { ?>


<div id="twitter_div-1">

TWITTER

</div>

<?php } else { ?>

<div id="twitter_div-2">

TWITTER

</div>

<?php ?>

And this caused the error cool, so now the sitemap module works again! There's only one thing... the droplets don't work anymore on the page on which I use the sitemap module... any help ?

« Last Edit: May 03, 2011, 07:41:40 PM by D. Peeters » Logged
D. Peeters

Offline Offline

Posts: 128


« Reply #6 on: May 03, 2011, 08:00:31 PM »

I solved it!
Logged
Ruud
WebsiteBaker Org e.V.

Offline Offline

Posts: 2297



WWW
« Reply #7 on: May 03, 2011, 10:18:08 PM »

To help any future visitors with a similar problem:

I discovered I made a mistake... I used the following script on the website

Your original unedited post showed you called a page_content(2) twice. That will act the same as using a module 2 times.

A clarification about droplets not working and being solved would be nice too.
Logged

Professional WebsiteBaker Solutions
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!