Support » Plugin: Simple Ads Manager » ad.class.php errors in Ad Zone assignment

  • I’m getting errors when I try to enable a zone in an Ad Block.

    It works just fine with 2×2 125x125px Ad Block with a seperate Ad Place assigned to each ‘square’.

    What I wanted to do was have a different Ad Place (one for business and another for personal) assigned to an Ad Zone.
    Once I set this up, and assigned that Ad Zone to the 125x125px Ad Block, I get these errors:

    Warning: Invalid argument supplied for foreach() in /home/xxxx/public_html/xxxx/wp-content/plugins/simple-ads-manager/ad.class.php on line 614
    Warning: Invalid argument supplied for foreach() in /home/xxxx/public_html/xxxx/wp-content/plugins/simple-ads-manager/ad.class.php on line 623

    Any ideas what I’ve done wrong here?
    Martin

    http://wordpress.org/extend/plugins/simple-ads-manager/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Ankur

    (@symmetricsolutions)

    I’m also experiencing the same error, not sure what is causing it. Anyone have a solution?

    Hi guys i got the same problem, and just comment this line for the moment and all works great the file name is \wp-content\plugins\simple-ads-manager/add.class.php

    the line commented was: 614-616

    /*foreach($cats as $key => $value) {
    if($value < 0) $cats[$key] = $zone[‘z_category’];
    }*/

    And the lines: 623-625
    /*foreach($archiveCT as $key => $value) {
    if($value < 0) $archiveCT[$key] = $zone[‘z_cts’];
    }*/

    Tim Nolan

    (@tim-nolan)

    Having the same problem.
    Tim Nolan

    davedg629

    (@davedg629)

    Having the same issue, but I’ll note that it’s only when my site is being browsed with the mobile version (the theme is switched using the w3 total cache plugin, caching is turned off though).

    lop_cz

    (@lop_cz)

    These errors are caused by wrongly saved values in Zone editor.
    It’s fine if you create new Zone, but once you update anything in it, values for DB fields “z_cats” and “z_archive_ct” are saved in wrong format.

    The solution is pretty simple:
    In zone.editor.admin.class.php just uncomment the line 156 that starts with //FIXED $formatRow = … and comment out the next line 157.

    This is probably just an overlooked bug because the correct format for DB fields is actually the first one and not the second.

    And you don’t have to modify ad.class.php in any way.

    Usarralde

    (@usarralde)

    Good morning,

    Today I disabled the plugin Wp Spam free, and have seen the error:

    Warning: Invalid argument supplied for foreach() in
    XXXXXXXXXXXXXX/hotelistico.com/wp-content/plugins/simple-ads-manager/ad.class.php on line 614
    and : /plugins/simple-ads-manager/ad.class.php on line 623

    I deleted the cache and WP Super Cache plugin too I disconnected, but still leaving the error. I deleted the line lop_cz (( with //FIXED $formatRow = … and comment out the next line 157.))) and still gives me the error.

    My solution: do not disconnect the Wp Spam free.

    regards

    lop_cz

    (@lop_cz)

    Maybe I haven’t said it clearly.

    You have to comment out or delete the line 157 and uncomment the line 156 by deleting just the //FIXED part and not the whole line.
    Then you have to update every Zone in Zone editor so the correct values are saved once again.
    You may have to look at the table wp_sam_zone in DB and check if “z_cats” and “z_archive_ct” fields contain serialized array and not a ‘0’ string.

    I don’t know about WP Spam Free plugin, but I don’t think it has anything to do with this issue.

    I hope this bug will be corrected soon by the developer.

    Had the same problem. Made it like lop_cz was describing – and working now!

    Thanks to lp_cz

    I have the same problem with the latest version of worpress 3.6

    I’ve solved with the indications of mag_pelon:

    the line commented was: 614-616

    /*foreach($cats as $key => $value) {
    if($value < 0) $cats[$key] = $zone[‘z_category’];
    }*/

    And the lines: 623-625
    /*foreach($archiveCT as $key => $value) {
    if($value < 0) $archiveCT[$key] = $zone[‘z_cts’];
    }*/

    We hope to officially correct author

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘ad.class.php errors in Ad Zone assignment’ is closed to new replies.