Error in BxDolTextSiteMaps.php

Hello everyone,

At 1AM when my cron jobs run, I get the following error emailed to me:

Fatal error: Call to a member function getDbPrefix() on a non-object in /MyServerPath-Hidden/inc/classes/BxDolTextSiteMaps.php on line 26

I'd like to fix this. Here is line 26:

            'table' => "`" . $this->_oModule->_oConfig->getDbPrefix() . "entries`", // table name

The whole file is below.

Any help would be greatly appreciated!

------------

<?php

/**

 * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/

 * CC-BY License - http://creativecommons.org/licenses/by/3.0/

 */

 

bx_import('BxDolSiteMaps');

bx_import('BxDolPrivacy');

 

/**

 * Sitemaps generator for News

 */

class BxDolTextSiteMaps extends BxDolSiteMaps

{

    protected $_oModule;

 

    protected function __construct($aSystem, &$oModule)

    {

        parent::__construct($aSystem);

 

        $this->_oModule = $oModule;

        $this->_aQueryParts = array (

            'fields' => "`id`, `uri`, `when`", // fields list

            'field_date' => "when", // date field name

            'field_date_type' => "timestamp", // date field type

            'table' => "`" . $this->_oModule->_oConfig->getDbPrefix() . "entries`", // table name

            'join' => "", // join SQL part

            'where' => "AND `status` = '" . BX_TD_STATUS_ACTIVE . "'", // SQL condition, without WHERE

            'order' => " `when` ASC ", // SQL order, without ORDER BY

        );

    }

 

    protected function _genUrl ($a)

    {

        return BX_DOL_URL_ROOT . $this->_oModule->_oConfig->getBaseUri() . 'view/' . $a['uri'];

    }

}

Quote · 27 Sep 2014

It maybe that the error is coming from 3rd-party module or some data is left in the DB after module uninstall.

You can try to disable site maps objects one by one to detect problematic record.

To disable particulat site maps object you need to set to 'active' field to '0' in 'sys_objects_site_maps' table (clear db cache after each change)

Rules → http://www.boonex.com/terms
Quote · 29 Sep 2014

I attached the contents of the table. I don't see anything that sticks out, meaning, no third party module is there that I am not using. 

Does something stick out to you? 

9-30-2014 12-54-03 PM.jpg · 199K · 144 views
Quote · 30 Sep 2014

This was another suggestion AlexT had.

You can try to disable site maps objects one by one to detect problematic record.
Did you do that?  I do not believe you did considering there are 10 entries but it's only been two days. That is not enough time because testing one each day would require 10 days.

Do as AlexT suggests. One of them is malfunctioning.

The other thing you can do is disable them all and then enable them one at a time. One each day until the error re-appears. Either way will work. You need to find which one is the problem, and it will take you 10 days to do it.

https://www.deanbassett.com
Quote · 30 Sep 2014

No I didn't -- I thought instead of waiting a week and a half trying something one by one, I could offer the screen shot and see if something stuck out to people who are smarter than me.

Turning them off seems a bit time consuming, but if that's my only option, then great.

Quote · 30 Sep 2014

Nothing sticks out. It is your only option.

https://www.deanbassett.com
Quote · 1 Oct 2014

Will it hurt anything to have them turned off for a day?

Quote · 1 Oct 2014

 

Will it hurt anything to have them turned off for a day?


Nope.

You can actually cut the time in half. I am guessing the issue is with one of the more recent ones. So i would start by disabling the last 5. The ones with the highest order number. If the problem goes away then you know it's one of those 5. It would cut the time to find it in half.

https://www.deanbassett.com
Quote · 1 Oct 2014

 

Will it hurt anything to have them turned off for a day?


Nope.

You can actually cut the time in half. I am guessing the issue is with one of the more recent ones. So i would start by disabling the last 5. The ones with the highest order number. If the problem goes away then you know it's one of those 5. It would cut the time to find it in half.

https://www.deanbassett.com
Quote · 1 Oct 2014

Ok after a few days of turning off, I discovered the error message changed, and got this message:

 

Fatal error: Cannot redeclare class BxNewsSiteMaps in /home/theblack/public_html/modules/modzzz/news/classes/BxNewsSiteMaps.php on line 38

Does this offer anything? 

Quote · 4 Oct 2014

Yea. I am guessing your not suppose to have modzzz news module and the default boonex news module installed at the same time. But yea, i am guessing that is the problem.

Do you have the boonex news module installed as well as the modzzz news module? Contact modzzz for clarification if you have have both installed. Point out the error to him as well.

https://www.deanbassett.com
Quote · 4 Oct 2014

 

Actually, no, the boonex news module is not installed. Yet, this still appears in the table and WAS active (I just turned only this one off, and will see tomorrow morning at 1AM if I receive an error):

_news_sitemap 0.8 auto BxNewsSiteMaps modules/boonex/news/classes/BxNewsSiteMaps.php

 

I assume that if I turn that off, this error will go away? The modzzz app has a different entry than the above:

_modzzz_news 0.8 auto BxNewsSiteMaps

modules/modzzz/news/classes/BxNewsSiteMaps.php

Quote · 4 Oct 2014

 

 

Actually, no, the boonex news module is not installed. Yet, this still appears in the table and WAS active (I just turned only this one off, and will see tomorrow morning at 1AM if I receive an error):

_news_sitemap 0.8 auto BxNewsSiteMaps modules/boonex/news/classes/BxNewsSiteMaps.php

 

I assume that if I turn that off, this error will go away? The modzzz app has a different entry than the above:

_modzzz_news 0.8 auto BxNewsSiteMaps

modules/modzzz/news/classes/BxNewsSiteMaps.php

 
If the boonex version is not installed, then that should not even be in there. You can shut it off, but i would delete it.

https://www.deanbassett.com
Quote · 4 Oct 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.