VigLink

VigLink 1.1.3

No permission to download
Brian Lovett submitted a new resource:

VigLink - Easily Enable VigLink on your xenForo Forum

VigLink identifies commercial products mentioned within a publisher’s content, and automatically invigorates those terms by transforming them into revenue generating hyperlinks whose destinations are determined in real-time, advertiser-bid auctions.

Easily enable VigLink Convert and Insert on your forum in a few simple steps and without having to edit any templates.

This add-on also gives you the ability to turn of Convert and Insert for certain User Groups.


VigLink Convert
Using...

Read more about this resource...
 
Many thanks Brian...

Just to confirm - Have installed - However the online checker is saying that "No instance of the VigLink code was found on your page." Is this correct please?

Cheers
Paul
 
Did the checker say "No instance of the VigLink code was found on your page." or "Your code is showing an incorrect key."

Main reason for "No instance of the VigLink code was found on your page."
  • You disabled unregistered from viewing VigLink in the addon settings
If this isn't the reason, XenForo seems to have a long caching period, then go into the Appearance -> Template Modifications. Click the helper_js_global under VigLink, and just resave and exit. This seems to remove the cache.

If you are getting the "Your code is showing an incorrect key." It is installed, just the wrong key is present, at the top of the page with the install checker, https://publishers.viglink.com/publisher/install#checkInstall change the dropdown to the site you are using and recheck.

If none of this helps, please send me a quick message with the settings you are using and the site url and I will check.
 
Last edited:
Hi Brian,

This is causing errors all over my Server Log like the following - I have had over 40 pages worth of instances of this since installed yesterday .....

Code:
[LIST]
[*]ErrorException: Template error: Cannot call method isMemberOf on a non-object (NULL)
[*]src/XF/Template/Templater.php:926
[*]Generated by: Unknown account
[*]Jul 10, 2018 at 3:35 PM
[/LIST]
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, 'Cannot call met...', '/home/pinball/p...', 926, Array)
#1 src/XF/Template/Templater.php(926): trigger_error('Cannot call met...', 512)
#2 internal_data/code_cache/templates/l1/s42/public/post_macros.php(96): XF\Template\Templater->method(NULL, 'isMemberOf', Array)
#3 src/XF/Template/Templater.php(662): XF\Template\Templater->{closure}(Object(ThemeHouse\UIX\XF\Template\Templater), Array, Array)
#4 internal_data/code_cache/templates/l1/s42/public/thread_view.php(720): XF\Template\Templater->callMacro('post_macros', 'post', Array, Array)
#5 src/XF/Template/Templater.php(1249): XF\Template\Templater->{closure}(Object(ThemeHouse\UIX\XF\Template\Templater), Array)
#6 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#7 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#8 src/XF/Mvc/Dispatcher.php(332): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#9 src/XF/Mvc/Dispatcher.php(303): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#10 src/XF/Mvc/Dispatcher.php(44): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#11 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#12 src/XF.php(328): XF\App->run()
#13 index.php(13): XF::runApp('XF\\Pub\\App')
#14 {main}

Also in response to your questions above, I am getting "No instance of the VigLink code was found on your page". Unregistered is enabled in addon settings. I have now tried re-saving "helper_js_global" - will see what happens with this...

EDIT - I am now getting positive "you have installed the code correctly" in the online tracker, however i am still getting the errors as seen above...

Cheers
Paul
 
Last edited:
Do you have any User Groups selected for the Disable VigLink by User Group setting? If so, which ones? I'm not able to recreate the error there.

Also, which version of XF are you running?
 
Hi Brian,
Please see below as to the options i have selected :

1531293436717.webp

Left enabled overnight, and again, 40 pages worth of errors :( Currently running latest release (2.0.6)

Cheers
Paul
 
So I am running 2.0.7 on the test forum with no errors and the same selections you have. Would you be able to upgrade to 2.0.7 and see if you still get the errors. It looks like they fixed this issue in 2.0.1 so I'm surprised you are still seeing it. If you still get the error with 2.0.7 I will post a in their bug reports.
 
K, good to hear. Thanks for letting us know. I will dig into it. For now you guys could disable the post_macro template modification for VigLink, since @Paul you didn't have any selected anyway. @Sportsoutlaw if you don't either for the Disable VigLink option, I would suggest the same. Just hit the toggle next to it. I'll look into what's going on here more in depth.

1531343472134.webp
 
K, good to hear. Thanks for letting us know. I will dig into it. For now you guys could disable the post_macro template modification for VigLink, since @Paul you didn't have any selected anyway. @Sportsoutlaw if you don't either for the Disable VigLink option, I would suggest the same. Just hit the toggle next to it. I'll look into what's going on here more in depth.

View attachment 179641

Thanks. Disabled the template.
 
Sorry @Paul, I was hoping that we could solve it with the upgrade. I never did mention disabling it till yesterday.

Do either you or @Sportsoutlaw have other addons that make changes to the post_macro file?

Also, would either of you be willing to assist with a quick test, since I can't replicate this error on my forum. Its 3 small steps and I can walk you through each. If you are willing to help please private message me, and I will send the updates to make. Thank you!
 
Maybe a silly question Brian - If the Addon works fine with the post_macro file disabled (i say "works fine" - the checker on the viglink site shows success), Why is it needed?? (Saying that, am only seeming to be seeing less than 50% of the clicks i usually get)....

Others using the same template??....
[AL] Original Poster Highlight
UI(x) Theme

@Sportsoutlaw have you either of these in use too??

Cheers
Paul
 
@Brian Lovett One more issue, Style are broken after installed this add-on.

ScreenShot00075.webp

Also Server error log:

Code:
ErrorException: [E_NOTICE] Array to string conversion src/XF/Repository/TemplateModification.php:118

Generated by: Nirjonmela Jul 13, 2018 at 7:02 PM

Stack trace

#0 [internal function]: XF::handlePhpError(8, '[E_NOTICE] Arra...', '/home/nadda/pub...', 118, Array)
#1 src/XF/Repository/TemplateModification.php(118): preg_replace_callback('/<div class="me...', Array, '<xf:macro name=...')
#2 src/XF/Repository/TemplateModification.php(53): XF\Repository\TemplateModification->applyTemplateModifications('<xf:macro name=...', Array, Array)
#3 src/XF/Entity/Template.php(185): XF\Repository\TemplateModification->applyModificationsToTemplate('public', 'post_macros', '<xf:macro name=...', Array)
#4 src/XF/Entity/Template.php(121): XF\Entity\Template->validateTemplateText('<xf:macro name=...', false, NULL, NULL)
#5 src/XF/Entity/TemplateModification.php(102): XF\Entity\Template->reparseTemplate()
#6 src/XF/Entity/TemplateModification.php(157): XF\Entity\TemplateModification->reparseTemplate(Object(DBTech\Security\XF\Entity\Template))
#7 src/XF/Mvc/Entity/Entity.php(1145): XF\Entity\TemplateModification->_postSave()
#8 src/XF/AddOn/DataType/TemplateModification.php(78): XF\Mvc\Entity\Entity->save(true, false)
#9 src/XF/Job/AddOnData.php(108): XF\AddOn\DataType\TemplateModification->importAddOnData('VigLink/VigLink', Object(SimpleXMLElement), 0, 7.9999971389771)
#10 src/XF/Job/Manager.php(241): XF\Job\AddOnData->run(7.9999971389771)
#11 src/XF/Job/Manager.php(187): XF\Job\Manager->runJobInternal(Array, 7.9999971389771)
#12 src/XF/Job/Manager.php(103): XF\Job\Manager->runJobEntry(Array, 7.9999971389771)
#13 src/XF/Admin/Controller/Tools.php(120): XF\Job\Manager->runByIds(Array, 8)
#14 src/XF/Mvc/Dispatcher.php(249): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#15 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', 'html', Object(XF\Mvc\ParameterBag), 'tools', Object(ThemeHouse\QAForums\XF\Admin\Controller\Tools), NULL)
#16 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#17 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#18 src/XF.php(328): XF\App->run()
#19 admin.php(13): XF::runApp('XF\\Admin\\App')
#20 {main}

Request state

array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(46) "/admin.php?tools/run-job"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(123) "/admin.php?add-ons/VigLink-VigLink/finalize&t=1531486946%2C824b30f64d229ab65841b8d46c0b4487&a=install"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(4) "3915"
  }
}
 
Also in response to your questions above, I am getting "No instance of the VigLink code was found on your page". Unregistered is enabled in addon settings. I have now tried re-saving "helper_js_global" - will see what happens with this...

EDIT - I am now getting positive "you have installed the code correctly" in the online tracker, however i am still getting the errors as seen above...

Cheers
Paul

I am also getting this error "No instance of the VigLink code was found on your page." How you are get fixed?
 
Top Bottom