WordPress.org

Forums

FaceBook Image Fix
Breaks "All in One Event Calendar" (3 posts)

  1. rjesse
    Member
    Posted 3 years ago #

    After installing Facebook Image Fix plugin, now when I click on a event in the widget area, I get text at the top of my page above the logo. For some reason the All in One headers are messing up the "Facebook Image fix" meta tags;

    see below;

    <meta property="og:title" content="Youth – All-Nighter"/>
    <meta property="og:type" content="blog"/>
    <meta property="og:url" content="http://glamorganchurch.ca/?ai1ec_event=youth-all-nighter&instance_id="/>
    <meta property="og:image" content=""/>
    <meta property="og:site_name" content="glamorganchurch.ca | All About Glamorgan Church"/>
    <meta property="fb:admins" content="100003642279211"/>
    <meta property="og:description" content="<div class="ai1ec-excerpt">
    <div class="ai1ec-time"><label class="ai1ec-label">When:</label> March 23, 2012 @ 7:00 pm – March 24, 2012 @ 7:00 am</div>
    <div class="ai1ec-location"><label class="ai1ec-label">Where:</label> Glamorgan Church</div>
    </div>
    <p>Cost $20 NOTE: Not meeting at the Church: Contact Rachel for Directions to Meeting Place</p>"/>
    <!-- End FaceBook Image Fix Plugin -->

    http://wordpress.org/extend/plugins/facebook-image-fix/

  2. rjesse
    Member
    Posted 3 years ago #

    Fixed it - sortof

    I edited the function getExc() in the "FaceBook Image Fix Plugin";

    The function was not parsing out invalid characters so it was messing up the html header, I call the function "htmlspecialcharacters" to turn the string into a valid html string that won't interfere with the header;

    before edit;

    function getExc($fbimgfixplugins, $length = 300)
    {
    global $wpdb;
    switch ($fbimgfixplugins) {
    case "wp":
    {
    if (is_home() || is_front_page()) {
    $desc = get_bloginfo('description');
    } else {
    $desc = get_the_excerpt();
    }
    }
    return trim($desc);

    after edit;

    function getExc($fbimgfixplugins, $length = 300)
    {
    global $wpdb;
    switch ($fbimgfixplugins) {
    case "wp":
    {
    if (is_home() || is_front_page()) {
    $desc = get_bloginfo('description');
    } else {
    $desc = get_the_excerpt();
    }
    }
    $newdesc = htmlspecialchars($desc);
    return trim($newdesc);

  3. capn3m0
    Member
    Plugin Author

    Posted 3 years ago #

    hi,

    i will test your fix and add it in the new version.

    thanks for the informations

    capn3m0

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • FaceBook Image Fix
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic