Live Update

Live Update 4.0.1

No permission to download
Hello, I tried version 4.0.1, XF 1.5.7, Safari 9.1 and with any page load I get the following Script Errors in the Browser Console:

View attachment 134227

The Code looks like this.
View attachment 134228

Does the add-on conflict with the "APP Icons"? I wonder if this works with Safari anyway?
After deactivating the add-on, the Errors are gone.

It looks like it's an issue with jquery not being loaded. Do you use any sort of deferred javascript add-on?
 
@Freelancer Something like this, https://xenforo.com/community/resources/defer-js.2972/
Those errors you got typically meant that jQuery wasn't loaded BEFORE the codes in your screenshots were being executed. If you were using a Defer JS add-on without proper configurations, jQuery might have been deferred (typically moved before </body> tag), thus caused it to load AFTER the codes in your screenshot (this is very unlikely though - that add-on should have moved those codes in your screenshot before </body> tag as well). Try to check your site's source code and see whether jQuery is being loaded BEFORE the codes in your screenshot or not.
 
Using the defer_javascript filter? I wasn't really fond of PageSpeed's implementation so I used Defer JS add-on on my site instead. But yeah, I suppose so.
 
Thank you guys for helping out!

I have about 40 add-ons running, but not one of that kind.

JQuery is in the <head></head> (and thus before <body>) and it comes after the script from Live Update.
Code:
<script src="js/jquery/jquery-1.11.0.min.js"></script>

If he's using PageSpeed via his HTTP server the same thing can be happening.
No Sir, the server is entirely free from "Goofle".
 
What I dont understand is that it "sticks" itself to the app icons. The app icons are just <link> tags in the PAGE_CONTAINER. And the script is duplicated for every app icon?
View attachment 134228

It comes AFTER the script from Live Update? That's where the fault lies. You need to move jQuery to be loaded before all other JS codes. Even before xenforo.js.
It comes before xenforo.js but there are additional add-ons that did put their scripts before JQuery. I would appreciate if you could give me a hint how I make sure JQuery is loaded first of everything.
 
What I dont understand is that it "sticks" itself to the app icons. The app icons are just <link> tags in the PAGE_CONTAINER. And the script is duplicated for every app icon?
View attachment 134228
Faulty codes. I believe it looks for <link> tag with "icon" in its rel attribute, so it got "apple-touch-icon" as well. You'll probably have to modify the template modification. I encountered this issue before because I also have apple-touch-icon in various sizes. But I've modified the add-on and completely removed the icon feature because I wasn't really fond of it anyway. I have made my site to only add the (n) prefix in the title bar (I also modified the Preferences page to reflect this change).
It comes before xenforo.js but there are additional add-ons that did put their scripts before JQuery. I would appreciate if you could give me a hint how I make sure JQuery is loaded first of everything.
I suggest checking PAGE_CONTAINER template. I believe you added those "apple-touch-icon" by yourself? At least I did it manually in my site. If so, just make sure that you move them after jQuery and preferably after xenforo.js as well.
 
Faulty codes. I believe it looks for <link> tag with "icon" in its rel attribute, so it got "apple-touch-icon" as well. You'll probably have to modify the template modification. I encountered this issue before because I also have apple-touch-icon in various sizes. But I've modified the add-on and completely removed the icon feature because I wasn't really fond of it anyway. I have made my site to only add the (n) prefix in the title bar (also modified the Preferences page).

Ah that makes sense. So it just searches for "icon" and then catches all instead of the favicon only...

I suggest checking PAGE_CONTAINER template. I believe you added those "apple-touch-icon" by yourself? At least I did it manually in my site. If so, just make sure that you move them after jQuery and preferably after xenforo.js as well.

Yes, I added the app icons myself. As pragmatic as I am, I just did place them at the very end before </head> and BINGO, the errors are gone (!!!), but the script attaches itself to each app icon still.

Whats the best way to put JQuery on top of all? I See PAGE_CONTAINER calls for "page_container_js_head" and in there is the call for JQuery, right?
 
Faulty codes. I believe it looks for <link> tag with "icon" in its rel attribute, so it got "apple-touch-icon" as well. You'll probably have to modify the template modification.
I see what you mean... The Template Mod explicitly states "Favicon" in the description but targets the apple-touch icon...

apple_icon.webp
 
I see what you mean... The Template Mod explicitly states "Favicon" in the description but targets the apple-touch icon...
What??? It targets "apple-touch-"??? That's weirder than I thought.. Well, it has been more than a month since I did the change, so my memories are rather vague. But yeah, just set it to specifically target your favicon... or I'm not sure anymore..
Yes, I added the app icons myself. As pragmatic as I am, I just did place them at the very end before </head> and BINGO, the errors are gone (!!!), but the script attaches itself to each app icon still.

Whats the best way to put JQuery on top of all? I See PAGE_CONTAINER calls for "page_container_js_head" and in there is the call for JQuery, right?
Yeah, adding them before </head> is fine as well.
And yeah, I kinda forgotten that PAGE_CONTAINER includes "page_container_js_head" template in which jQuery is loaded. If you only want to add the apple-touch-icon, adding them before </head> will work just fine. I added mine right after favicon and before Open Graph. I also use Defer JS though, so all other SCRIPT tags are moved before </body> tag.
source_code_snippet.webp
 
I see what you mean... The Template Mod explicitly states "Favicon" in the description but targets the apple-touch icon...

View attachment 134259
The template modification is added just after the apple-touch-icon of which, by default, there should only be one. If you add more then it will find them and duplicate the location for the JS code.

I can't immediately offer a solution to this other than moving your touch icons elsewhere so they are not in that template. Maybe the page_container_js_head template would work (as long as the XF added touch icon remains where it is).
 
I can't immediately offer a solution to this other than moving your touch icons elsewhere so they are not in that template. Maybe the page_container_js_head template would work (as long as the XF added touch icon remains where it is).

In my case I even have UIX installed, so the path to the favicon is changed.

What I came up with is now:
In Live Update's template mod "PAGE_CONTAINER" inserted the following:

In the field "Find" I inserted:
Code:
<link href="{$xenOptions.uix_favicon}" rel="icon

In the field "Replace" it stays:
Code:
<xen:include template="liveupdate_page_container" />
$0

In "liveupdate_page_container" I replaced
Code:
<link rel="shortcut icon" href="{xen:if $xenOptions.liveUpdateFavicon, $xenOptions.liveUpdateFavicon, favicon.ico}" />

with:
Code:
<link rel="shortcut icon" href="{xen:if $xenOptions.liveUpdateFavicon, $xenOptions.liveUpdateFavicon, $xenOptions.uix_favicon}" />

This works, but strangely enough I have the code two times..?
doubled_code.webp

I added mine right after favicon and before Open Graph.
Great idea. I now did the same. Thanks!

I also use Defer JS though, so all other SCRIPT tags are moved before </body> tag.
Would you recommend using this add-on in general?
 
Last edited:
I had to shut off this addon because it was causing registrations to fail. I haven't gotten back to it until now, does the following she light on anything for anyone?

Code:
Server Error Log
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Data truncated for column 'liveupdate_display_option' at row 1 - library/Zend/Db/Statement/Mysqli.php:214
Generated By: Unknown Account, Apr 2, 2016
Stack Trace
#0 /home/*******/public_html/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/*******/public_html/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/*******/public_html/library/Zend/Db/Adapter/Abstract.php(574): Zend_Db_Adapter_Abstract->query('INSERT INTO `xf...', Array)
#3 /home/*******/public_html/library/XenForo/DataWriter.php(1638): Zend_Db_Adapter_Abstract->insert('xf_user_option', Array)
#4 /home/*******/public_html/library/XenForo/DataWriter.php(1627): XenForo_DataWriter->_insert()
#5 /home/*******/public_html/library/XenForo/DataWriter.php(1419): XenForo_DataWriter->_save()
#6 /home/*******/public_html/library/XenForo/ControllerPublic/Register.php(416): XenForo_DataWriter->save()
#7 /home/*******/public_html/library/Waindigo/JoinUserGroup/Extend/XenForo/ControllerPublic/Register.php(64): XenForo_ControllerPublic_Register->actionRegister()
#8 /home/*******/public_html/library/UserEss/ControllerPublic/Register.php(68): Waindigo_JoinUserGroup_Extend_XenForo_ControllerPublic_Register->actionRegister()
#9 /home/*******/public_html/library/Andy/RegisterEmail/ControllerPublic/Register.php(7): UserEss_ControllerPublic_Register->actionRegister()
#10 /home/*******/public_html/library/XenForo/FrontController.php(351): Andy_RegisterEmail_ControllerPublic_Register->actionRegister()
#11 /home/*******/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#12 /home/*******/public_html/index.php(13): XenForo_FrontController->run()
#13 {main}
Request State
array(3) {
  ["url"] => string(56) "https://www.greateriowareefsociety.org/register/register"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(15) {
    ["username"] => string(0) ""
    ["a372a7891d77fd4a31ab7ffde6737566"] => string(12) "*******"
    ["3b1799a110bb377944b29a197541ab7b"] => string(21) "*******@gmail.com"
    ["18ae0bd8fe7b473fcac691d1eebf428a"] => string(0) ""
    ["5fa85cc1fd1c3a084bd8ef729832a94d"] => string(4) "male"
    ["dob_month"] => string(2) "*******"
    ["dob_day"] => string(2) "*******"
    ["dob_year"] => string(4) "*******"
    ["location"] => string(19) "*******"
    ["d5503573afc4538e4392bac4a3f64b1f"] => string(15) "America/Chicago"
    ["captcha_question_answer"] => string(4) "*******"
    ["captcha_question_hash"] => string(40) "*******"
    ["agree"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["reg_key"] => string(32) "*******"
  }
}
 
Top Bottom