Page breaks when changing tabs if using CB avatars
-
ResolvedIf I'm using Community Builder for my avatars I get this problem:
Lets say I'm looking at "All Discussions", and I decide to click on "Featured"...
Once I do that I get this code that shows up right before the avatar of the user on the top post.
It seems to happen with any link that uses javascript.
I also had this same problem with the previous version of easydiscuss.
Any ideas? Screen shot
Subscribed Products:
Accepted Answer
-
Selected answer for this questionHello MrBlackBoot,
Ah, sorry about that. I wanted to wait for an official reply form the Community Builder dev's about their API before altering the codes internally. Still waiting for a reply from them at https://www.joomlapolis.com/forum/147-potential-bug/186872-getfield-generating-script-tags#186979
Anyway this is what you can do, edit the file /components/com_easydiscuss/helpers/integrate.php and locate the line 177,
$field = $user->getField( 'avatar', null, 'php', 'none', 'list' ); $avatarLink = $field['avatar'];
Replace the codes above with the following,
$avatarLink = $user->avatarFilePath();
MrBlackBoot likes this post.
14 responses Add a reply
-
-
-
-
-
-
Subscribed Products: -
Subscribed Products: -
-
Hello MrBlackBoot,
I have fixed this issue on your site by changing the API calls to Community Builder. When the following codes are used, (This is actually recommended by the CB guys),
$user->getField( 'avatar', null, 'php', 'none', 'list' );
It seems to also trigger some plugins that will actually generate some 'javascript' tags as below,
<script type="text/javascript" src="/http://refernet35.org/components/com_comprofiler/js/jquery-1.5.2/jquery-1.5.2.min.js?v=5dc11eced412cdd6"></script><script type="text/javascript"><!-- jQuery.noConflict(); --></script> <script type="text/javascript" src="/http://refernet35.org/components/com_comprofiler/js/tabpane.min.js?v=5dc11eced412cdd6"></script> <script type="text/javascript"><!-- jQuery(document).ready(function($){ var cbshowtabsArray = new Array(); function showCBTab( sName ) { if ( typeof(sName) == 'string' ) { sName = sName.toLowerCase(); } for (var i=0;i<cbshowtabsArray.length;i++) { for (var j=0;j<cbshowtabsArray[i][0].length;j++) { if (cbshowtabsArray[i][0][j] == sName) { eval(cbshowtabsArray[i][1]); return; } } } }}); --></script>
This actually causes problem since we are only expecting the URL to the avatar. I have modified the codes so that the avatar retrieval uses the following codes instead,
$avatarLink = $user->avatarFilePath();
However, based on their API, this function seems like it has been deprecated but we'll need to check this with them again.1 vote by MrBlackBootMrBlackBoot likes this post.
-
Subscribed Products: -
-
Subscribed Products: -
Subscribed Products: -
Your Response
Please login to reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.