Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

ReferenceError: joms is not defined - joms.filters.bind()

10 years 5 days ago
  • Petr's Avatar
    Topic Author
  • Petr
  • Offline
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 0
Licenses:
JomSocial Expired

Hi there,

I found error with firebug (tried to solve it on my own but without success)

On home page of community there is this error (home icon at profile toolbar when logged in),other icons and menu items in toolbar dont throw this error.

ReferenceError: joms is not defined
joms.filters.bind()

I found that in script of this site there is added this inline script right after all external js and css are called.

<script type="text/javascript">
jQuery.noConflict();
var frontpageUsers = 0;
var frontpageUsers = 20;
joms.filters.bind()
var frontpageVideos = 5;
function keepAlive() { var myAjax = new Request({method: "get", url: "index.php"}).send();} window.addEvent("domready", function(){ keepAlive.periodical(1740000); });
</script>



Find in total commander that joms.filters.bind()
is placed in these files

/components/com_community/templates/default/frontpage.index.php
/components/com_community/templates/default/profile.index.php


What should do that function and what can i do to repair that error.

Thank you in advance

Petr

10 years 5 days ago
Licenses:

Hi, Petr.

But what is final effect of this error and how it influence JomSocial performance?


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
10 years 5 days ago
  • Petr's Avatar
    Topic Author
  • Petr
  • Offline
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 0
Licenses:
JomSocial Expired

I hoped that you tell me that, i am new to Jomsocial (i am developing site) so i dont know whole functionality. I just saw that js error and posted it here. It seem that everything is fine, but the code perhaps should do something and i dont know what.

10 years 5 days ago
  • Petr's Avatar
    Topic Author
  • Petr
  • Offline
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 0
Licenses:
JomSocial Expired

And sorry Michal, i didnt say you Hi :)

10 years 5 days ago
Licenses:

Hi, Petr.

Usually this error comes along with some issues like blank page or post box issues.
If it don't affect JomSocial performance than it's strange... but good :) Kind of king of glitch :)
Try to switch to default Joomla! template and check if error is still there. Also upgrade JomSocial to current version -> 3.2.0.5


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
10 years 4 days ago
  • Petr's Avatar
    Topic Author
  • Petr
  • Offline
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 0
Licenses:
JomSocial Expired

Hi Michal, upgraded to 3.2.0.5. (with patch file from 3.2.0.4.) and firebug showed 2 errors :

1) ReferenceError: joms is not defined
joms.filters.bind()

2)ReferenceError: joms_script_url is not defined
error source line:
relpath = joms_script_url || '';


Tried to exclude whole component Com_community from merging in Jbetolo plugin and that solved 1) problem.

But second one still occurre.

Second one is called in loader.js and function from that file:

var timestamp = ( new Date() ).getTime(),
relpath = false;
function url( src ) {
if ( relpath === false ) {
relpath = joms_script_url || '';
}
return relpath + src;
}



In my past problem Dimas patched some file or files , because following files throws 404 not found error. It was exactly these files:

toolkit.js
templates/jst.js
bundle.js

These files are mentioned in that loader.js file right after the function written above

He patched it on version 3.2.0.4 and after i used patch from 3.2.0.4 to 3.2.0.5 (you advice me). Can be Dimas's patched files rewritten with that official patch, or that official patch to 3.2.0.5. fixed that bug and used his patch he first applied in my case ? Can be there any connection between my error and things mentioned ?

I hope we will together fix my issue.

Thx Petr

10 years 3 days ago
Licenses:

Hi, Petr.

Ah, so that was js merge issue.

Dimas patch should be included in official hot fix. I assign Dimas to that thread so he'll advice you better...


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
The following user(s) said Thank You: Petr
10 years 2 days ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

Hi,

Please you check this file components/com_community/views/views.php, can you find this code ?

$js = '<script>joms_script_url = "' . JURI::root() . 'components/com_community/assets/_release/js/";</script>';

10 years 2 days ago
  • Petr's Avatar
    Topic Author
  • Petr
  • Offline
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 0
Licenses:
JomSocial Expired

Hi Dimas,

no, this code isn´t there. Should i to add it there, if so where ? :)

Thx Petr

10 years 2 days ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

add it before this code :

CAssets::attach($js, 'js');

at the bottom of components/com_community/views/views.php

10 years 2 days ago
  • Petr's Avatar
    Topic Author
  • Petr
  • Offline
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 0
Licenses:
JomSocial Expired

This is exacly what i have at the and of views.php , there are lot of code CAssets::attach($js, 'js'); so where exactly? can u please sent me edited end of my view.php file with that code you provided. Thank you...


// Load rtl stylesheet
if ($document->direction == 'rtl') {
CTemplate::addStylesheet('style.rtl');
}

$template = new CTemplateHelper;
$styleIE7 = $template->getTemplateAsset('styleIE7', 'css');

$css = '<!-- JomSocial -->
<!--[if IE 7.0]>
<link rel="stylesheet" href="' . $styleIE7->url . '" type="text/css" />
<![endif]-->';

$document->addCustomTag($css);

$css = 'assets/autocomplete.css';
CAssets::attach($css, 'css');

$jVersion = new JVersion();
// Add Twitter Bootstrap Library
if (version_compare($jVersion->getShortVersion(), "2.5.999") <= 0) {
$css = 'assets/bootstrap/css/bootstrap.min.css';
CAssets::attach($css, 'css');
}
$js = 'assets/bootstrap/bootstrap.min.js';
CAssets::attach($js, 'js');
$js = 'assets/jqueryui/datepicker/js/jquery-ui-1.9.2.custom.js';
CAssets::attach($js, 'js');
$js = 'assets/jqueryui/datepicker/js/jquery-ui-timepicker-addon.min.js';
CAssets::attach($js, 'js');
$css = 'assets/jqueryui/datepicker/css/ui-lightness/jquery-ui-1.9.2.custom.css';
CAssets::attach($css, 'css');
$css = 'assets/jqueryui/datepicker/css/jquery-ui-timepicker-addon.css';
CAssets::attach($css, 'css');

// Required, but added in default template
// Load joms.ajax
CTemplate::addScript('joms.ajax');

// Pickadate.
$isMobile = preg_match( '/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i', $_SERVER );
$js = 'assets/pickadate/picker.combined.js';
CAssets::attach($js, 'js');
$css = 'assets/pickadate/themes/' . ( $isMobile ? 'default' : 'classic' ) . '.combined.css';
CAssets::attach($css, 'css');

// Rendering issue on iOS browser: stackoverflow.com/questions/6890149/remo...-ios-webkit-textarea
$isIOS = preg_match( '/iphone|ipad|ipod/i', $_SERVER );
if ( $isIOS ) {
$css = '<style type="text/css">.textntags-wrapper textarea { left: -3px !important; width: 102% !important; }</style>';
$document->addCustomTag($css);
}

// Backbone.
$css = 'assets/_release/css/bundle.css';
CAssets::attach($css, 'css');
// Note: Avoid using CAssets::attach() here since it will cause trouble with T3 in optimised mode.
$js = '<script src="' . JURI::root() . 'components/com_community/assets/_release/js/loader.js"></script>';
$document->addCustomTag($js);

}

}

10 years 2 days ago
  • Petr's Avatar
    Topic Author
  • Petr
  • Offline
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 0
Licenses:
JomSocial Expired

Hi, i tried place that code ,you provided, myself. When i put it right before code u sent me (CAssets::attach($js, 'js');) , firebug shows Syntax error. So i tried different places,

1)
$js = 'assets/bootstrap/bootstrap.min.js';
CAssets::attach($js, 'js');
Placed it here

2)
// Note: Avoid using CAssets::attach() here since it will cause trouble with T3 in optimised mode.
$js = '<script src="' . JURI::root() . 'components/com_community/assets/_release/js/loader.js"></script>';
$document->addCustomTag($js);
Placed it here
}
}


After loading it to server , cleared cache, but problem
ReferenceError: joms_script_url is not defined
error source line:
relpath = joms_script_url || '';

still occure. Now i have your code in place mentioned in point 1) of this reply.

Any other help?

Thx you Petr

10 years 2 days ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

Hi Petr,

Please check again, I just fix this issue..look at file 680 - 689, that is code from me..

thank you

10 years 1 day ago
  • Petr's Avatar
    Topic Author
  • Petr
  • Offline
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 0
Licenses:
JomSocial Expired

Hi Dimas, no more error, perfect !!!!
Thank you very much, thumbs up !!!!!!!!

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW