-
AuthorPosts
-
turminator Friend
turminator
- Join date:
- August 2008
- Posts:
- 247
- Downloads:
- 47
- Uploads:
- 46
- Thanks:
- 23
- Thanked:
- 4 times in 1 posts
June 17, 2013 at 11:45 am #188281I saw this thread that is very interesting with T3 framework:
http://beta.jomsocial.com/forum/beta1/111-dropdown-menu-stops-working
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
June 18, 2013 at 7:43 am #496139The problem you mentioned was not from T3 Framework. JomSocial has created a new file: components/com_community/assets/joms.jquery-1.8.1.min.js which joms.jquery-1.8.1.min is a special name with the keyword jQuery. This one was duplicated with jQuery in T3 and caused error.
However, you can fix this conflict by following my solution here:
Open plugins/system/t3/includes/core/template.php file
from
$pattern = '/jquery([-_]*d+(.d+)+)?(.min)?.js/i';//is jquery core
foreach ($scripts as $script => $opts) {
if(preg_match($pattern, $script)) {
$jqueryIncluded = 1;
}
}change to
$pattern = '/(^|/)jquery([-_]*d+(.d+)+)?(.min)?.js/i'; //is jquery core
foreach ($scripts as $script => $opts) {
if(preg_match($pattern, $script)) {
$jqueryIncluded = 1;
}
}jooservices Friendjooservices
- Join date:
- October 2014
- Posts:
- 8556
- Downloads:
- 0
- Uploads:
- 130
- Thanked:
- 1245 times in 1121 posts
June 19, 2013 at 2:23 am #496221Hi there,
Actually i don’t think i’ll login back JA Forum to make any post, but this topic force me to do that.As Ninja Lead said. It’s JomSocial issue because use “special name with the keyword jQuery”. I do not agreed at all. Not only JomSocial but any extensions on Joomla! can do naming their files with any name they want even: jquery-[version].min.js or jquery-[version].js. And it’s not mistake to do !!!
JA / T3 must face to face on this point instead refuse it and force all developers change their filename ! Totally wrong ! and wrong !
About jQuery detection. Server side just a part of work, client side also need to do !!! Root thing !
Server side detect and mention to client say: Hey, i guess jQuery was included. Please do more check to confirm !
Client side: If not received mention will do basic checking but when receive mentioned will need more strict checking !I’ll give here sample solution for client side
/* jQuery loader plugin */
var _CrexJQueryLoader = {
/* Default recheck interval */
_defaultInterval: 1000,
/* Default configuration fallback */
_defaultConfig: {
update_interval: 5000,
messages_counter: 5,
jquery_version: '1.8.3',
debug: false
},
/* HTML inner */
_jQueryRef: null,
/* Check HTML elemet existing */
refExisted: function()
{
return (this._jQueryref != "undefined") ? true : false;
},
/* Is jQuery loaded */
isJQueryLoaded: function()
{
return (typeof jQuery != "undefined") ? true : false;
},
/* Create DOM elemet */
createElement: function() {
/* Create <script> element */
this._jQueryRef = document.createElement('script');
/* Set applications type */
this._jQueryRef.setAttribute("type", "text/javascript");
/* jQuery hosted by google */
this._jQueryRef.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/" + this._defaultConfig.jquery_version + "/jquery.min.js");
},
/* Add elemet to header */
insertHeader: function() {
/* Append to head */
if (this.refExisted()) {
document.getElementsByTagName("head")[0].appendChild(this._jQueryRef);
}
}};
and before call your script ( based on jQuery ) you’ll need check if jQuery include
/* CrexNotifications construction */
_init: function()
{
if (this.jqueryLoader.isJQueryLoaded())
{
console.log("JQuery loaded !!!.");
this.startCrexNotifications();}
else
{
console.log("Try to load JQuery !!!.");
this.jqueryLoader.createElement();
this.jqueryLoader.insertHeader();var intervalHandler = window.setInterval(function() {
if (CrexNotifications.jqueryLoader.isJQueryLoaded)
{
window.clearInterval(intervalHandler);
CrexNotifications.startCrexNotifications();
}
}, this.jqueryLoader._defaultInterval);
}
},
It’s basic way. And in strict case. You’ll need call to double check again jQuery include in all functions of your script library !
Finally please note: There are tons of Joomla! extensions. You can’t force what do they can do . You’ll need improve your code first ( yes, it would be reduce performance but it’s required for these thing ).
Thank you,
Viet VuArvind Chauhan ModeratorArvind Chauhan
- Join date:
- September 2014
- Posts:
- 3835
- Downloads:
- 74
- Uploads:
- 92
- Thanks:
- 1240
- Thanked:
- 1334 times in 848 posts
June 19, 2013 at 3:33 am #496231Thanks Vu,
For your feedback, its appreciated. We are not forcing anyone to change their way of doing things at the same time, we can not be dictated how we should code, T3 is under active development and as the need comes we are ready to change it to accommodate the concerns of other developers. Did I NOT make this clear to you, when I chatted with you?
In this case, some of your comments could have been avoided. I talked with Merav and I also talked to you, I confirmed my commitment to fix any bug hampering JomSocial functionality with T3 templates.
But with this attitude from the JS team members, I don’t feel encouraged enough to take this task on priority.
I feel sorry, that I tried to reach out and resolve the issue.
Arvind
irwanjomsocial Friendirwanjomsocial
- Join date:
- November 2010
- Posts:
- 1
- Downloads:
- 3
- Uploads:
- 0
- Thanked:
- 2 times in 2 posts
June 19, 2013 at 3:15 pm #496281Hi guys,
There is really no need to get overly dramatic about this issue 🙂 Arvind and I had a nice talk yesterday and he agreed to help with any conflicts that arise, that’s the whole point of our beta testing program. Whatever issues we have, we can resolve it in a civilized and friendly manner. At JomSocial we really love and appreciate Joomlart and we are looking forward to a long lasting partnership.
Merav
CEO
iJoomla/JomSocial2 users say Thank You to irwanjomsocial for this useful post
jooservices Friendjooservices
- Join date:
- October 2014
- Posts:
- 8556
- Downloads:
- 0
- Uploads:
- 130
- Thanked:
- 1245 times in 1121 posts
namepeoples Friendnamepeoples
- Join date:
- January 2011
- Posts:
- 35
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 2
- Thanked:
- 2 times in 1 posts
June 20, 2013 at 6:06 pm #496411I was directed to this discussion from another post I submitted. I have tried to look at my server and do not have the file system described above. Is there another possibility where the file is located?
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
June 21, 2013 at 9:13 am #496476Hi namepeoples,
As I can see from your attached screenshot, you are using JAT3 v2 – old version of our framework, while this thread is discussing about new T3 framework. You can pm me URL, admin and FTP account of your site and tell me more details about problem you are experiencing, I will check for you.
namepeoples Friendnamepeoples
- Join date:
- January 2011
- Posts:
- 35
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 2
- Thanked:
- 2 times in 1 posts
June 21, 2013 at 12:28 pm #496505Saguaros, Sorry but this site is behind a firewall so you will not be able to log-in. Would I be able to upgrade to v3 framework and have this work. If so, how would I download the latest version of the T3.
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
June 22, 2013 at 2:39 am #496544May I know which JA template you are using? Since new T3 version is used for JA Brisk, JA Mero and all new 2013 templates. If you are using old JAT3 v2 framework, you can not use new T3 since it will cause conflict.
You can download new T3 here or visit http://t3-framework.org/ to know more about T3
namepeoples Friendnamepeoples
- Join date:
- January 2011
- Posts:
- 35
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 2
- Thanked:
- 2 times in 1 posts
June 22, 2013 at 3:53 am #496545I am using the JA_Social template.
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
June 23, 2013 at 7:08 am #496588This JA Social template runs with JAT3 v2 version. Try to use Firebug in Firefox or Inspect Element in Chrome > check the error tab and see whether there is any error or not. If yes, you can post error in details here.
But the best way is still that I can access your site and detect what error is so that I can give you best solution.
namepeoples Friendnamepeoples
- Join date:
- January 2011
- Posts:
- 35
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 2
- Thanked:
- 2 times in 1 posts
June 24, 2013 at 3:58 am #496636Thanks again for your willingness to help out. As I stated this is located behind my company’s firewall and can only be accessed through our VPN which can not give permissions for. I have attached images of errors from both Chrome and Firefox.
-
namepeoples Friend
namepeoples
- Join date:
- January 2011
- Posts:
- 35
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 2
- Thanked:
- 2 times in 1 posts
July 9, 2013 at 9:52 pm #498452Any ideas what could be happening based on the errors shown in the attached files.
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
July 10, 2013 at 1:42 am #498459Your site seems to have some conflict in JS. If you have 3rd party extensions installed in your site, try to disable one by one to know which one causes the conflict.
I see some others use this plugin to avoid the conflict, backup your site and give it a try to know how it goes.
-
AuthorPosts
This topic contains 16 replies, has 7 voices, and was last updated by namepeoples 11 years, 4 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum