Jump to content

Error Message when trying to delete banner


Recommended Posts

Dear all,

I tried to delete a banner in the backend of Revive 4.0.0 and I received the following error message:

Due to a problem with the database Revive Adserver couldn't retrieve or store data. If this problem is reproducable it might be caused by a bug in Revive Adserver. Please report the following information to the creators of Revive Adserver. Also try to describe the actions that led to this error as clearly as possible.

 

Version:       Revive Adserver v4.0.0
PHP/DB:    PHP 5.6.25 / MySQL 5.6.35-1~dot+7.1
Page:    /revive/xxx/www/admin/banner-delete.php
Error:    Table 'db11111.ox_ext_market_stats' doesn't exist
Query:    SELECT *
 FROM ox_ext_market_stats
 WHERE (  ox_ext_market_stats.ad_id = 100 )
$_POST:    Empty
$_GET:    Array
(
    [clientid] => 100
    [campaignid] => 30
    [token] => ccccccccccccccccccccccccccccc
    [bannerid] => 40


Is this a bug in Revive as indicated above, or what can be done in order to successfully perform the deletion process of banners?

Thanks.

Tom

Link to comment
Share on other sites

Dear Revive Developer Team,

no reply on this? Maybe I have posted it in the wrong category.

I believe this is really a S/W bug, at least it was indicated like this by Revive itself (see above).

How can this be solved or mitigated.

Thanks

Tom

Link to comment
Share on other sites

Hi @tom83,

So, this looks very unusual. The code should not be attempting to delete from the ext_market_stats table, and indeed, that table should not exist - it was removed with the first release of Revive Adserver.

I suspect you have had an issue with an upgrade at some point coming from OpenX to Revive Adserver, and something has gone wrong.

Do you have an OpenX Market plugin (or similar) installed, that is not one of the core plugins? https://documentation.revive-adserver.com/display/DOCS/Standard+Plugins

Link to comment
Share on other sites

Hi andrewatfornax,

thanks for the answer.

You are right, I derived to Revive by an upgrade from OpenX. During the upgrade I also had to manually upgrade the plugins again, but which worked successfully.

Concerning your question I have only the core plugins installed (as mentioned in your link).

What can I do now in order to fix this issue?

Thanks in advance for your support.

Tom

Link to comment
Share on other sites

Hi andrewatfornax,

I checked both.

There is just a oxMarket folder under admin/plugins, but nothing directly under plugins.

The dedicated config section looks as follows:

[plugins]
openXBannerTypes=1
openXDeliveryLimitations=1
openX3rdPartyServers=1
openXReports=1
openXDeliveryCacheStore=1
openXMaxMindGeoIP=1
openXInvocationTags=1
openXDeliveryLog=1
openXMarket=0
openXVideoAds=0

Any further ideas?

Tom

Link to comment
Share on other sites

Hi andrewatfornax,

do you mean that I should just delete the oxMarket folder in the plugins folder in order to fix it?

Is there a chance to delete it via the backend of Revive as well in order to ensure consistency?

Thanks

Tom

Link to comment
Share on other sites

Hi @tom83,

Yes, I'm proposing deleting the oxMarket folder - although the plugin is marked as inactive in your configuration file, perhaps bad code is still scanning the fact the plugin code is there, and attempting to execute it.

Keep a copy of the folder, though, in case removing it breaks things more than already, and you need to put the folder back to get things back to where you are now.

Link to comment
Share on other sites

Hi andrewatfornax,

I have deleted oxMarket successfully without any further issues, but when I am trying to delete a banner the following error message comes again:

Due to a problem with the database Revive Adserver couldn't retrieve or store data. If this problem is reproducable it might be caused by a bug in Revive Adserver. Please report the following information to the creators of Revive Adserver. Also try to describe the actions that led to this error as clearly as possible.

Version:       Revive Adserver v4.0.0
PHP/DB:    PHP 5.6.25 / MySQL 5.6.35-1~dotdeb+7.1
Page:    /revive/xxx/admin/banner-delete.php
Error:    Table 'db11111.ox_ext_market_stats' doesn't exist
Query:    

SELECT *
 FROM ox_ext_market_stats
 WHERE (  ox_ext_market_stats.ad_id = 100 ) 

$_POST:    

Empty

$_GET:    

Array
(
    [clientid] => 100
    [campaignid] => 30
    [token] => ccccccccccccccccccccccc
    [bannerid] => 40
)

Any further ideas (e.g. chache, config)?

Thanks

Tom

   
   
   
   
   
   
   
Link to comment
Share on other sites

Hi,

I am not comfortable enough with this tool, but I checked the logic once again.

In  /revive/xxx/admin/banner-delete.php the script tries to delete something out of db11111.ox_ext_market_stats, but in my database there is this table missing, but a table ox_ext_market_web_stats is existing.

I would imagine that there is a issue when updating openx to revive and having this Market Plugin installed.

Is there somebody in the community who has an idea to fix that, because I believe this is a general openx/revive issue when upgrading.

Furthermore there is still the following in the config.php:

[oxMarket]
marketHost="https://pc.openx.com"
marketPcApiHost="https://api.pc.openx.com"
fallbackPcApiHost="http://api.pc.openx.com"
marketXmlRpcUrl="api/xml-rpc"
marketPublicApiUrl="api/public/v1"
marketCustomContentUrl="market/content"
marketMenuUrl="market/index/menu"
defaultFloorPrice="0.10"
marketAccountIdParamName=pa
marketWelcomeUrl="market/index/welcome"
marketCaptchaUrl="https://pc.openx.com/api/captcha"
marketTermsUrl="http://www.openx.org/market/terms"
marketPrivacyUrl="http://www.openx.org/privacy"
openXTermsUrl="http://www.openx.org/terms"
publisherSupportEmail="[email protected]"
openXPrivacyUrl="http://www.openx.org/privacy"
splashAlreadyShown=1
dictionaryCacheLifeTime=86400

[oxMarketDelivery]
brokerHost="bid.openx.net"

Can I delete this as well?

Maybe there is a routine to systematically remove all former openx Market Plugin leftovers?

I believe this is important for all Revive users.

Thanks in advance.

Tom

Link to comment
Share on other sites

Hi @tom83,

Yes, understood that it's happening when banner-delete.php is called, but the trick is finding out where in the code base the actual SQL is that is trying to delete from the now removed table. I've tried looking through the code base, but I can't find anything - which makes sense, because the issue doesn't happen for me. It's obviously something happening just on your system, but it's hard to know where it's happening.

You certainly can remove those configuration items, but I doubt it will make any difference - it's worth trying, though.

Link to comment
Share on other sites

Hi,

thanks for the information.

I also tried to find a logic. The issue is that banner-delete.php does not find the db file ox_ext_market_stats where it wants to delete the respective banner from.

This means the banner information has to be in a different db file. Therefore my question would be in which db file the banners are stored regularly?

My current banner-delete.php file looks like that:

<?php

/*
+---------------------------------------------------------------------------+
| Revive Adserver                                                           |
| http://www.revive-adserver.com |
|                                                                           |
| Copyright: See the COPYRIGHT.txt file.                                    |
| License: GPLv2 or later, see the LICENSE.txt file.                        |
+---------------------------------------------------------------------------+
*/

// Require the initialisation file
require_once '../../init.php';

// Required files
require_once MAX_PATH . '/lib/OA/Dal.php';
require_once MAX_PATH . '/xxx/admin/config.php';
require_once MAX_PATH . '/xxx/admin/lib-storage.inc.php';
require_once MAX_PATH . '/xxx/admin/lib-zones.inc.php';
require_once MAX_PATH . '/xxx/admin/lib-statistics.inc.php';
require_once MAX_PATH . '/lib/OA/Maintenance/Priority.php';

// Register input variables
phpAds_registerGlobal ('returnurl');

// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER);
OA_Permission::enforceAccessToObject('clients',   $clientid);
OA_Permission::enforceAccessToObject('campaigns', $campaignid);

// CVE-2013-5954 - see OA_Permission::checkSessionToken() method for details
OA_Permission::checkSessionToken();

/*-------------------------------------------------------*/
/* Main code                                             */
/*-------------------------------------------------------*/

if (!empty($bannerid)) {
    $ids = explode(',', $bannerid);
    while (list(,$bannerid) = each($ids)) {
        $doBanners = OA_Dal::factoryDO('banners');
        $doBanners->bannerid = $bannerid;
        if ($doBanners->get($bannerid)) {
            $aBanner = $doBanners->toArray();
        }

        $doBanners->delete();
    }

    // Queue confirmation message
    $translation = new OX_Translation ();

    if (count($ids) == 1) {
        $translated_message = $translation->translate ($GLOBALS['strBannerHasBeenDeleted'], array(
            htmlspecialchars($aBanner['description'])
        ));
    } else {
        $translated_message = $translation->translate ($GLOBALS['strBannersHaveBeenDeleted']);
    }

    OA_Admin_UI::queueMessage($translated_message, 'local', 'confirm', 0);}

// Run the Maintenance Priority Engine process
OA_Maintenance_Priority::scheduleRun();

// Rebuild cache
// include_once MAX_PATH . '/lib/max/deliverycache/cache-'.$conf['delivery']['cache'].'.inc.php';
// phpAds_cacheDelete();

if (empty($returnurl)) {
    $returnurl = 'campaign-banners.php';
}

header("Location: ".$returnurl."?clientid=".$clientid."&campaignid=".$campaignid);

?>

Maybe we can bring this subject foward now by finding the logic between the php file and the correct db file.

Thank you.

Tom

Link to comment
Share on other sites

  • 2 weeks later...

Hi @tom83,

You are correct - the information for the banner that is being deleted doesn't live in the ox_ext_market_stats database table - it lives in another table. However, what is going on is that for some reason, your Revive Adserver installation appears to think that it needs to not only delete the banner - and the stats from the code stats tables for that banner - but also delete any stats in the ox_ext_market_stats database table. That means that for some reason, the code is still locating something that is telling it that the ox_ext_market_stats database table should exist, and that when you delete a banner, this table needs clearing out for the banner as well.

I don't know why that is happening, or where it is happening.

If I search my code base of Revive Adserver, there are no hits at all for the string "ext_market_stats".

If you grep your code base for the string "ext_market_stats", do you have any files that show up with this text in them?

Link to comment
Share on other sites

On 28.6.2017 at 7:54 AM, andrewatfornax said:

If I search my code base of Revive Adserver, there are no hits at all for the string "ext_market_stats".

If you grep your code base for the string "ext_market_stats", do you have any files that show up with this text in them?

...can you tell me how can I do that?

Tom

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...