Digital Point Ad Positioning

Digital Point Ad Positioning 1.3.0b

No permission to download
1.4.3 and this add-on
zero errors in the log file.

Are you sure you're not clashing with another add0n or customization? I'm using adsense and also Amazon CPM ads.

Particular JS is Amazon - but ads pass through to adsense if Amazon doesn't fill them at the rate I set...
 
Last edited:
Code:
Zend_Exception: No entry is registered for key 'session' - library/XenForo/Application.php:1005
Generated By: Unknown Account, 10 minutes ago
Stack Trace
#0 /home/unkn0wn/public_html/forums/library/XenForo/Application.php(1585): XenForo_Application::get('session')
#1 /home/unkn0wn/public_html/forums/library/Sedo/TinyQuattro/Listener/AllInOne.php(28): XenForo_Application::getSession()
#2 [internal function]: Sedo_TinyQuattro_Listener_AllInOne::controllerPreDispatch(Object(DigitalPointAdPositioning_ControllerPublic_Misc), 'AdsenseAuth', 'XenForo_Control...')
#3 /home/unkn0wn/public_html/forums/library/XenForo/CodeEvent.php(58): call_user_func_array(Array, Array)
#4 /home/unkn0wn/public_html/forums/library/XenForo/Controller.php(311): XenForo_CodeEvent::fire('controller_pre_...', Array, 'XenForo_Control...')
#5 /home/unkn0wn/public_html/forums/library/XenForo/FrontController.php(346): XenForo_Controller->preDispatch('AdsenseAuth', 'XenForo_Control...')
#6 /home/unkn0wn/public_html/forums/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#7 /home/unkn0wn/public_html/forums/index.php(13): XenForo_FrontController->run()
#8 {main}
Request State
array(3) {
  ["url"] => string(49) "http://portalcentric.net/forums/misc/adsense-auth"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(2) {
    ["username"] => string(4) "true"
    ["password"] => string(8) "********"
  }
}

doesnt look like a clash.. i believe it is the http://portalcentric.net/forums/misc/adsense-auth i have the crawler access thing on. do u? turn that on set it up and ul see the errors flow in "AdSense Crawler Password" from there i followed instructions and configured on my adsense account
 
crawler access thing?
I have google analytics, etc. but maybe I exclude some crawlers...but not googles!

Edit - I hide my DP ads from registered users, maybe that's what keeps it clean?
 
Code:
Zend_Exception: No entry is registered for key 'session' - library/XenForo/Application.php:1005
Generated By: Unknown Account, 10 minutes ago
Stack Trace
#0 /home/unkn0wn/public_html/forums/library/XenForo/Application.php(1585): XenForo_Application::get('session')
#1 /home/unkn0wn/public_html/forums/library/Sedo/TinyQuattro/Listener/AllInOne.php(28): XenForo_Application::getSession()
#2 [internal function]: Sedo_TinyQuattro_Listener_AllInOne::controllerPreDispatch(Object(DigitalPointAdPositioning_ControllerPublic_Misc), 'AdsenseAuth', 'XenForo_Control...')
#3 /home/unkn0wn/public_html/forums/library/XenForo/CodeEvent.php(58): call_user_func_array(Array, Array)
#4 /home/unkn0wn/public_html/forums/library/XenForo/Controller.php(311): XenForo_CodeEvent::fire('controller_pre_...', Array, 'XenForo_Control...')
#5 /home/unkn0wn/public_html/forums/library/XenForo/FrontController.php(346): XenForo_Controller->preDispatch('AdsenseAuth', 'XenForo_Control...')
#6 /home/unkn0wn/public_html/forums/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#7 /home/unkn0wn/public_html/forums/index.php(13): XenForo_FrontController->run()
#8 {main}
Request State
array(3) {
  ["url"] => string(49) "http://portalcentric.net/forums/misc/adsense-auth"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(2) {
    ["username"] => string(4) "true"
    ["password"] => string(8) "********"
  }
}

doesnt look like a clash.. i believe it is the http://portalcentric.net/forums/misc/adsense-auth i have the crawler access thing on. do u? turn that on set it up and ul see the errors flow in "AdSense Crawler Password" from there i followed instructions and configured on my adsense account
No errors for me either. Have you tried disabling your Sedo addon to see if that's it?
That is @cclaerhout's TinyQuattro addon.

The line which is blowing up is:
Code:
XenForo_Application::getSession()->set('sedoQuattro', $data);

It is expecting a session to be around.
 
That is @cclaerhout's TinyQuattro addon.

The line which is blowing up is:
Code:
XenForo_Application::getSession()->set('sedoQuattro', $data);

It is expecting a session to be around.
This command is a standard one, especially for the controller PreDispatch listener. The session data should be available there. If there are not, there's a problem elsewhere.
Edit: I will check the "DigitalPointAdPositioning_ControllerPublic_Misc::AdsenseAuth" since the error message indicates this action controller is passed in the controller listener.
Edit2: it seems to be related to functions extended with the load_class_controller ; which is strange because the session looks available:
PHP:
    if (!XenForo_Application::isRegistered('session'))
     {
       return;
     }
=> will have no effect
 
Last edited:
@digitalpoint
Your extended class "DigitalPointAdPositioning_ControllerPublic_Misc" is the source of the issue. Some functions override default XenForo_Controller functions whereas it doesn't appear to have any needs.
For my addon and any other addons that will try to get the XF session from the controller PreDispatch listener, the below overridden function will mess up the process:
PHP:
protected function _setupSession($action) {}

You should also check any of all other overridden functions:
PHP:
  protected function _checkCsrfFromToken($token = null, $throw = true)
   {
     return true;
   }
   
   protected function _setupSession($action) {}
   
   public function updateSessionActivity($controllerResponse, $controllerName, $action) {}
   
   public function canUpdateSessionActivity($controllerName, $action, &$newState)
   {
     return false;
   }
   
   protected function _assertViewingPermissions($action) {}
   
   protected function _assertNotBanned() {}
   
   protected function _isDiscouraged() {}

You should also check if the "$this->_assertPostOnly();" is needed in your action.
 
  • Like
Reactions: Xon
Unfortunately without a URL, there isn't anything I can look at...
Don't need a url because it happens on all thread when enabled.

I have some nodes/forum selected on: AdSense Will Never Display In These Forums

But still ads that I put on "After Post Ad HTML" field always displayed even if selected or blacklisted forum node.
 
It only detects AdSense usage of you are using standard AdSense code. Are you using something other than their standard JS?
 
But "Insert Ad Inside Post" is working perfectly fine, and not showing ads on blacklisted forum node.
 
@digitalpoint
Your extended class "DigitalPointAdPositioning_ControllerPublic_Misc" is the source of the issue. Some functions override default XenForo_Controller functions whereas it doesn't appear to have any needs.
For my addon and any other addons that will try to get the XF session from the controller PreDispatch listener, the below overridden function will mess up the process:
PHP:
protected function _setupSession($action) {}

You should also check any of all other overridden functions:
PHP:
  protected function _checkCsrfFromToken($token = null, $throw = true)
   {
     return true;
   }
  
   protected function _setupSession($action) {}
  
   public function updateSessionActivity($controllerResponse, $controllerName, $action) {}
  
   public function canUpdateSessionActivity($controllerName, $action, &$newState)
   {
     return false;
   }
  
   protected function _assertViewingPermissions($action) {}
  
   protected function _assertNotBanned() {}
  
   protected function _isDiscouraged() {}

You should also check if the "$this->_assertPostOnly();" is needed in your action.
Yeah, it's a little tricky because regardless if the class is extended or overwritten, there still wouldn't be a session afterwards since we need to stop the creation of sessions (and other things) for that HTTP request. We are specifically only extending the Misc controller if it's an adsense authentication request, which is why we are just overwriting the method. There isn't a way to extend it, but also stop the creation of the session (which is the goal), but even if there was you would still be left with no session. Even if we made a totally new controller that had sessions suppressed (for example how the standard upgrade or install controllers work), you *still* would be left with no session creation.

The session being available in the ControllerPreDispatch is not a guarantee, it's just moot with standard XenForo controllers because the ones that don't create the session also don't run addon listeners. I wish there was a way to do it on my end where we can not create the session and also allow other addons to gracefully try to get a session without checking if there's a session to get, but I can't think of a way to do it beyond what you already mentioned (checking if the session is available in your addon).

But "Insert Ad Inside Post" is working perfectly fine, and not showing ads on blacklisted forum node.
Not sure... I just tested it, and it seems to be working fine when I test it. I'd double check your AdSense code... specifically it's looking for the string "pagead2.googlesyndication.com" in your ad HTML to make the determination if it's an AdSense ad or not.

@digitalpoint will u be working on a fix for the Key Season Bug..

i don't want another 100+ pages in my error log...
Not sure what that is (I see zero errors being logged on my install), so at the moment, no... not working on it.
 
@digitalpoint then how do i stop the seasons showing the log then? re-install doesn't do sht... turning off ur add one fixes it but it not really a fix is it...

and do u have the ad sense crawler login set up? i believe it only started doing that when i set that up.. so set that up and see if it happens to u
 
@digitalpoint then how do i stop the seasons showing the log then? re-install doesn't do sht... turning off ur add one fixes it but it not really a fix is it...
Not sure, without access to your servers it would be impossible to see what's causing it. Like I said, it's not something that I've seen in our server log (ever), so difficult to debug on this end.

and do u have the ad sense crawler login set up? i believe it only started doing that when i set that up.. so set that up and see if it happens to u
Yes, we use the AdSense crawler function without any errors.
 
i just ran a crawler test on google and i got this on my site:
@cclaerhout ur TinyQuattro also shows in this log
Code:
Server Error

No entry is registered for key 'session'

    XenForo_Application::get() in XenForo/Application.php at line 1585
    XenForo_Application::getSession() in Sedo/TinyQuattro/Listener/AllInOne.php at line 28
    Sedo_TinyQuattro_Listener_AllInOne::controllerPreDispatch()
    call_user_func_array() in XenForo/CodeEvent.php at line 58
    XenForo_CodeEvent::fire() in XenForo/Controller.php at line 311
    XenForo_Controller->preDispatch() in XenForo/FrontController.php at line 346
    XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
    XenForo_FrontController->run() in /home/admin/public_html/forums/index.php at line 13

same error shows in my testboard just installed the add one same issue..

i can give u account to debug with on admin.. Via PM if that will help...
 
Last edited:
Top Bottom