test
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • slepoy Friend
    #183819

    I use the great “JA Elastica” template on my site and there some problem with Community Polls component.

    Seems, <blockquote>template is loading the conflicting jquery library without proper checking. causing the other loaded scripts non functional. it is loaded from /templates/ja_elastica/js/jquery/jquery-1.6.4.min.js</blockquote>

    Community Poll’s developer suggested:
    <blockquote>ask template provider to add check if not done already. or provider him where to add that</blockquote>

    $app = Jfactory::getApplication();
    $jversion = version_compare(JVERSION, '3.0.0', 'ge') ? 3 : 2.5;

    if($app->jquery == false && $jversion < 3){
    // load jquery here
    // and set app value
    $app->jquery = true;
    }

    What can I do to make Community Polls works property with Ja Elastica (problem here)?

    Thanks for help.

    Ninja Lead Moderator
    #479211

    You can see place added “jquery-1.6.4.min.js” file on JA_Elastica Template
    <blockquote>Admin ->Extension ->Template Manager-> JA_Elastica – Default -> LAYOUTS tab -> Edit default</blockquote>

    <file>js/mega.rjd.js</file>
    <file>js/jquery/jquery-1.6.4.min.js</file>
    <file>js/jquery.masonry.js</file>

    About conflict jQuery on jquery-1.6.4.min.js file, you can fix with this solutions
    <blockquote>Open templates/ja_elastica/js/jquery/jquery-1.6.4.min.js file</blockquote>
    modify it

    if (! window.jQuery) {
    // curently code on jquery-1.6.4.min.js file
    }

    slepoy Friend
    #479297

    Sadly, but it didn’t helped :((

    Ninja Lead Moderator
    #479328

    <em>@slepoy 354561 wrote:</em><blockquote>Sadly, but it didn’t helped :((</blockquote>
    I have checked jquery-1.6.4.min.js file on this link:
    <blockquote>http://crimson-land.ru/templates/ja_elastica/js/jquery/jquery-1.6.4.min.js</blockquote>
    But i don’t see you work with my suggestions

    You can download and extract my attachment file
    Copy to it this path
    <blockquote>templates/ja_elastica/js/jquery/jquery-1.6.4.min.js</blockquote>


    slepoy Friend
    #479399

    Sorry. it didn’t helped.
    Problem is still here.


    1. CP_template_incompatibility
    Ninja Lead Moderator
    #479450

    This is not a conflict js issue, this is a problem from overlapping css on your site.
    <blockquote>Open components/com_cjlib/bootstrap/css/bootstrap.min.css file</blockquote>
    from

    .dropup,.dropdown{position:relative}
    change to

    .dropup,.dropdown{ }

    See the screenshot


    1. Overlap_Css
    slepoy Friend
    #479666

    Thanks you very much.
    It helps to fix “dropdown menu” bug, but the other (search module, etc) is still here :[ Also if “Community Polls – Random Poll” module published – it breaks template. Does this means CSS overlapping problem too?
    Thanks.

    Ninja Lead Moderator
    #479825

    <em>@slepoy 355094 wrote:</em><blockquote>[ Also if “Community Polls – Random Poll” module published – it breaks template. Does this means CSS overlapping problem too?</blockquote>

    How can i see it on your site?

    You can use debug on Firefox browser detect the problem css file on your site and fix it.

    quatgio Friend
    #495115

    I think you should to use jquery-1.6.7.min.js, This version will support more.

    slepoy Friend
    #500372

    Hello. I get the same problem with “CjBlog component” and drop-down menu (it doesn’t open).
    CoreJoomla developer say again:
    <blockquote>There is a conflicting jquery library loaded after cjblog jquery at
    /templates/ja_elastica/js/jquery/jquery-1.6.4.min.js
    find in your template code where they are loading it and add check if it is already loaded or not.</blockquote>

    $app = JFactory::getApplication();
    if(!$app->jquery){
    // load library here
    $app->jquery = true;
    }

    In which file I need to paste this code? Thanks.

    Ninja Lead Moderator
    #500404

    This is problem conflict with 3rd party(CjBlog). You should also raise this in the CjBlog forum, you might get better answers there.

    slepoy Friend
    #507039

    Hello.
    I update Ja Elastica to the latest version with jQuery 1.8.3 and get some problems with “Community Polls” component. I skill can’t find the reason. Can You help me?

    Community Polls has option: enable jQuery loading (Yes / Not)).
    If I set “Not” (is far is I understant it makes jQuery loading only by “Ja Elastica”?) poll doesn’t work here http://crimson-land.ru/community/polls.html
    I can press button “Vote now” but it doesn’t work.

    If I set “Yes” (is far is I understant it makes jQuery loading twice by “Ja Elastica” and “Community Polls”?) I can press “Vote now” button – it transform to “Please wait…” (but result doesn’t show. poll still displayed). After refreshing page I can see results – it was voted. And I get the same situation with default/Atomiv template (after clearing cashe).

    Community Polls’s developer said
    <blockquote>Your template is loading the jQuery after other libraries loaded causing earlier ones fail…
    I don’t see any issue with Atomic (default) template on my site, may be there is some other plugin on your site causing issue. With the current template you have now, there is a conflicting jquery loaded at
    /templates/ja_elastica/js/jquery/jquery-1.8.3.min.js
    You need to change your template to load the jquery with proper checking like this:
    $app = JFactory::getApplication();
    if(!$app->jquery){
    // load the jquery here
    $app->jquery = true;
    }</blockquote>

    I made it here http://crimson-land.ru/templates/ja_elastica/js/jquery/jquery-1.8.3.min.js , but it didn’t helped.
    This code checked well loading jQuery by jReviews component. But it breac template in main and other pages.

    Also I tried to use this code:
    [PHP]if (! window.jQuery) {
    // curently code on jquery-1.8.3.min.js file
    }[/PHP]But it didn’t solved the problem. I’m confused. Thanks for help.

    slepoy Friend
    #507073

    Alsp there is error was spotted <blockquote>Uncaught ReferenceError: joms is not defined</blockquote> by JomSocial (may be because some JomSocial modules are used in Community Poll page?).

    Also I’d like to repost message from official JomSocial forum about jQuery and JA3:

    “Viet Vu” post=39534This issue we already addressed since JomSocial 3.0 Beta and posted in our beta forum:

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

    I’ll repost here as reference with detail of explain ( code inspected by Hung Tran )

    I have checked with T3 Blank Template – Quickstart and our JomSocial 3.0 latest repo.
    I can reproduce your issue and here is what I figured out.

    # There template use T3 via system plugin

    pluginssystemt3

    # As i have mentioned above. It’s javascript conflict in T3.
    Not in JomSocial page, they have included jQuery


    <script src="/plugins/system/t3/base/js/jquery-1.8.3.min.js" type="text/javascript"></script>

    And their javascript will work fine ! Okay for this point.
    But in JomSocial it’s not included by somehow, and you got jQuery error


    Uncaught TypeError: undefined is not a function bootstrap.js:29
    Uncaught ReferenceError: jQuery is not defined off-canvas.js:104
    Uncaught ReferenceError: jQuery is not defined script.js:129
    Uncaught ReferenceError: jQuery is not defined menu.js:74
    Uncaught ReferenceError: jQuery is not defined responsive.js:16

    I tried to check into their framework to understand this reason and I found this:


    // Add scripts
    if(version_compare(JVERSION, '3.0', 'ge')){
    JHtml::_('jquery.framework');
    } else {
    $scripts = @$this->_scripts;
    $jqueryIncluded = 0;
    if(is_array($scripts) && count($scripts)) {
    $pattern = '/jquery([-_]*d+(.d+)+)?(.min)?.js/i';//is jquery core
    foreach ($scripts as $script => $opts) {
    if(preg_match($pattern, $script)) {
    $jqueryIncluded = 1;
    }
    }
    }

    if(!$jqueryIncluded) {
    $this->addScript (T3_URL.'/js/jquery-1.8.3' . ($this->getParam('devmode', 0) ? '' : '.min') . '.js');
    $this->addScript (T3_URL.'/js/jquery.noconflict.js');
    }
    }
    define('JQUERY_INCLUED', 1);

    File location

    pluginssystemt3includescoretemplate.php

    Above code use regular expression to check if any script file have named “jquery” . If had they will stop not include their jQuery .


    $pattern = '/jquery([-_]*d+(.d+)+)?(.min)?.js/i';//is jquery core
    foreach ($scripts as $script => $opts) {
    if(preg_match($pattern, $script)) {
    $jqueryIncluded = 1;
    }
    }

    The root cause of this problem is in the above code

    Not any file name named matches the above code is jQuery library. It could be wrong in some case ! And it should be a better way to detect the jQuery.

    in JomSocial we have joms.jquery-1.8.1.min.js . It’s jQuery, yes but not standard jQuery. It’s modified and can’t use as standard way.


    if(!$jqueryIncluded) {
    $this->addScript (T3_URL.'/js/jquery-1.8.3' . ($this->getParam('devmode', 0) ? '' : '.min') . '.js');
    $this->addScript (T3_URL.'/js/jquery.noconflict.js');
    }

    And from now all javascript of T3 is broken!

    I would suggest you to keep in mind about this jQuery detecting method. It could happen in any kind of component using customize jQuery.

    I still can’t understand the reason of conflict: Community Polls and Ja Elastica or Community Polls and JomSocial module?

    Thanks.

    Ninja Lead Moderator
    #507443

    @slepoym: I saw some issues about conflict problem of JA Elastica template with other 3rd party. How can I see the problem on link your site: http://crimson-land.ru/?

    If possible you can pm me admin access of your site and FTP account. I shall check directly on your site.

Viewing 14 posts - 1 through 14 (of 14 total)

This topic contains 14 replies, has 3 voices, and was last updated by  Ninja Lead 11 years, 2 months ago.

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