Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • turminator Friend
    #188281

    I saw this thread that is very interesting with T3 framework:

    http://beta.jomsocial.com/forum/beta1/111-dropdown-menu-stops-working

    Ninja Lead Moderator
    #496139

    The 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 Friend
    #496221

    Hi 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 Vu

    Arvind Chauhan Moderator
    #496231

    Thanks 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 Friend
    #496281

    Hi 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/JomSocial

    jooservices Friend
    #496282

    Hi @arvind.
    In relationship between Joomlart & JomSocial i’m sorry for above replied that not friendly, it was not my intention.

    Thank you,
    Viet Vu

    namepeoples Friend
    #496411

    I 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?


    1. Screen-Shot-2013-06-20-at-1.04.17-PM
    Saguaros Moderator
    #496476

    Hi 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 Friend
    #496505

    Saguaros, 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 Moderator
    #496544

    May 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 Friend
    #496545

    I am using the JA_Social template.

    Saguaros Moderator
    #496588

    This 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 Friend
    #496636

    Thanks 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.


    1. Screen-Shot-2013-06-23-at-10.49.54-PM
    2. Screen-Shot-2013-06-23-at-10.52.58-PM
    namepeoples Friend
    #498452

    Any ideas what could be happening based on the errors shown in the attached files.

    Saguaros Moderator
    #498459

    Your 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.

Viewing 15 posts - 1 through 15 (of 16 total)

This topic contains 16 replies, has 7 voices, and was last updated by  namepeoples 10 years, 10 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum