Facebook Link function not working with Artisteer theme (FIX)


Author Message
John K Johnson

Posted: 5/7/2010
Quote message 

Here is the fix for the problem.

Thanks to the guys in the Joomla forum for figuring what was breaking.

The <span class="l"> </span> and span class="r"> </span> in the menu is breaking the FaceBook link share function.

The fix in Drupal follows:

common_methods.php

line 87 and 92 (at least in mine)

search for $spanL, you will be in the neighborhood

87 $spanL->nodeValue = " ";
92 $spanR->nodeValue = " ";

on both lines, change
nodeValue = " " to nodeValue = "&nbsp;"


There are other places in the code where <span class="l"></span> and span class="r"></span>

these are not causing a problem, at least not yet.
 
Yann

Posted: 5/13/2010
Quote message 

Thanks for the tip, it saved my day :) O:)
 
Mark C

Posted: 5/16/2010
Quote message 

It took a bit of searching before I found this (last week), great tip. I sent a support request to Artisteer to ask for this to be implemented. Feel free to copy it and send it yourself:

===
Hi Folks,

If you share a page on Facebook from an Artisteer generated theme (certainly a Drupal Artisteer theme, and it appears Joomla as well, I'm guessing the rest too), it just shows up as a link - the title, image, and description (teaser) are stripped.

The fix is very simple, and one I'm sure you could implement in about 20 seconds.

Here it is:
http://www.artisteer.com/Default.aspx?post_id=133729&p=forum_post

 
Mark C

Posted: 5/18/2010
Quote message 

Artisteer have just told me that they will use this fix and implement it in the next release of Artisteer.
 
John K Johnson

Posted: 6/26/2010
Quote message 

This does not work all of the time. There are other place in the code where it can happen and cause the same problem.

Additional changes, some or all may be required.


template.php

Change original

'<span class="l"> </span>'.
'<span class="r"> </span>'.

TO

return '<span class="art-button-wrapper">'.
'<span class="l">&nbsp;</span>'.
'<span class="r">&nbsp;</span>'.
'<input type="submit" '. (empty($element['#name']) ? '' : 'name="'. $element['#name']
.'" ') .'id="'. $element['#id'].'" value="'. check_plain($element['#value']) .'" '. drupal_attributes($element['#attributes']).'/>'.
'</span>';

Same can be found in

drupal5_methods.php
drupal6_methods.php

Some sites, the original fix works, some sites require all 4 files to be fixed.