Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author Arnan de Gans

    (@adegans)

    And the issue was resolved in the current version.

    After installing that update, did you click the “finish update” button in your dashboard when prompted?
    If you did, please check your servers error_log file for anything mentioning AdRotate – Anything is interesting.

    Thread Starter Cognisant_2000

    (@cognisant_2000)

    Hi Arnan

    We fixed this by patching the code. All hooks to from the date and plugin where missing.

    If anyone needs this fix, please contact me.

    Plugin Author Arnan de Gans

    (@adegans)

    What hooks? Please get in touch – https://ajdg.solutions/contact/

    Thread Starter Cognisant_2000

    (@cognisant_2000)

    Here is the code for the fix:

    LINE 269
    if(strlen($schedule_id)==0){
    $wpdb->insert($wpdb->prefix.’adrotate_schedule’, array(‘name’ => ‘Schedule’, ‘starttime’ => $startdate, ‘stoptime’ => $enddate, ‘maxclicks’ => $maxclicks, ‘maximpressions’ => $maxshown));
    $sc_id = $wpdb->insert_id;
    $wpdb->update($wpdb->prefix.’adrotate_schedule’, array(‘name’ => ‘Schedule ‘.$sc_id), array(‘id’ => $sc_id));
    $lmeta=$wpdb->get_row(‘SELECT * FROM ‘.$wpdb->prefix.’adrotate_linkmeta WHERE ad = ‘.$id, ARRAY_A);
    if($lmeta === NULL){
    $wpdb->insert($wpdb->prefix.’adrotate_linkmeta’, array(‘ad’ => $id, ‘group’ => ”, ‘user’ => ”, ‘schedule’ => $sc_id));
    }
    else{
    $wpdb->update($wpdb->prefix.’adrotate_linkmeta’, array(‘schedule’ => $sc_id), array(‘ad’ => $id));
    }
    }
    else{

    Line 283
    }

    I’m still having this issue.

    By the way, i was never prompted to finish update, in fact, i just reinstalled it and i’m still seeing this bug.

    What else can we do?

    I received an update yesterday, it’s v4.7 by now and still, we have this issue. Date is stuck at Jan 1, 1970 and not able to be changed.

    Thread Starter Cognisant_2000

    (@cognisant_2000)

    @akerfeldt use the code we have published above to fix it. There is no other way and do not update afterwards as you will wipe out the fix.

    I had the same problem and took the nuclear option

    I saved my most important stats, deleted the plugin and installed a new one then recreated all my ads…

    A bit laborious but it works…!

    Thread Starter Cognisant_2000

    (@cognisant_2000)

    @mister_russ just use the code we have left on this entry (see above) and it will fix it. No need to delete and reinstall.

    Thanks, but I’m not that comfortable with code…
    Anyway, it was good to get rid of some old ads.

    @cognisant_2000 is this fix perhaps for line 296? I assume in adrotate.php? Looks like it fist better there with the date related info

    Thread Starter Cognisant_2000

    (@cognisant_2000)

    @quickonline Hi. That is correct. The error is in the plugin itself and not a WordPress issue, but beware that everytime you upgrade the plugin, you need to check if they have fixed the issue and if not, you have to reapply this code again!!

    To our knowledge this fix has not been implemented so at the moment you have to reapply after an upgrade.

    Thanks @cognisant_2000 – I’m just wondering about the location, perhaps this file changed in a later version – below is lines 257 – 283 in this installation’s adrotate.php file.

        	<?php 
    	    if ($view == "" OR $view == "manage") {
    			// Show list of errorous ads if any			
    			if ($error) {
    				include("dashboard/publisher/adverts-error.php");
    			}
    	
    			include("dashboard/publisher/adverts-main.php");
    
    			// Show disabled ads, if any
    			if ($disabled) {
    				include("dashboard/publisher/adverts-disabled.php");
    			}					
    		} else if($view == "addnew" OR $view == "edit") { 
    			include("dashboard/publisher/adverts-edit.php");
    	   	} else if($view == "generator") { 
    			include("dashboard/publisher/adverts-generator.php");
    		}
    		?>
    		<br class="clear" />
    	
    		<?php echo adrotate_trademark(); ?>
    
    	</div>
    <?php
    }
    
    MacDoodle

    (@macdoodle)

    Same problem. Not comfortable with editing code.

    Is there any other resolution?

    Is this possible a permissions issue with the database?

    mister_russ

    (@mister_russ)

    MacDoodle,

    I am the same, ie not comfortable with editing code.
    Simple solution is to save your stats, delete the plug in completely and install the latest version and recreate your ads…

    All works perfectly and not a single line of code to change !

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Date stuck at 1970 is still unresolved’ is closed to new replies.