• Resolved mortifrog

    (@mortifrog)


    This is wierd and unfortunately, I cannot pin down precisely when it started happening, but I only noticed it yesterday. I’m sure it didn’t use to do this.

    I have Mystique theme and I use Smart Youtube plugin in most of my posts.

    For a normal page such as my home page

    https://mortifrog.basnet.co.uk/

    Everything works fine. Videos display ok and XHTML validates.

    If I do a search using Firefox the page displays ok with all the videos in posts intact. However, the xhtml does not validate.

    https://validator.w3.org/check?uri=http%3A%2F%2Fmortifrog.basnet.co.uk%2F%3Fs%3Ddaniel;accept=text%2Fhtml%2Capplication%2Fxhtml%2Bxml%2Capplication%2Fxml%3Bq%3D0.9%2C*%2F*%3Bq%3D0.8;accept-language=en-gb%2Cen%3Bq%3D0.5;accept-charset=ISO-8859-1%2Cutf-8%3Bq%3D0.7%2C*%3Bq%3D0.7

    If I do the same search in IE8 (doesn’t matter if I am in compatibility mode or not) – as the page renders – the videos appear – then they disappear leaving white space in their place.

    I have tried disabling all plugs-ins (which is really annoying as settings disappear in WP Super Cache and WordPress.com Stats) to no avail.

    I think the problem is something to do with the ampersand before mystique not saying & in the source code of the search results:

    @import "https://mortifrog.basnet.co.uk/?s=daniel&mystique=css";

    However, I have been unable so far to find where about this line of code is being generated from. I tried downloading the mystique theme from my themes directory and searching all the files for: mystique=

    found nothing:

    searched for @import and amongst a couple of other results which I don’t think were relevant – I found the following code which I think might be causing the error, although I could be way of the mark.

    function mystique_load_stylesheets(){ ?>
    <style type="text/css">
     @import "<?php bloginfo('stylesheet_url'); ?>";
     @import "<?php echo esc_url_raw(add_query_arg('mystique', 'css', (is_404() ? get_bloginfo('url') : mystique_curPageURL()))); ?>";
    </style>

    Has anyon got any ideas please?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter mortifrog

    (@mortifrog)

    I’m on WordPress 3.0

    My validator link got screwed up sorry.

    I think the problem is something to do with the ampersand before mystique not saying & in the source code of the search results:

    should have read:

    I think the problem is something to do with the ampersand before mystique not saying & in the source code of the search results:

    Thread Starter mortifrog

    (@mortifrog)

    lol – I can’t make this page display an ampersand followed by amp; !

    Thread Starter mortifrog

    (@mortifrog)

    Another observation – the “white space” where the videos should appear in search results is not white space at all. If I right click on it I get the About Adobe Flash 10 context menu.

    I can’t see any difference between how the video embed is code generated in search results to a normal page. This is why I suspect the non validating XHTML is causing the problem.

    Also the page hangs forever and in the status bar it says x items remaining – x being the number of search results up to a maximum of 5 which is how many posts I currently show per page.

    Moderator keesiemeijer

    (@keesiemeijer)

    Did you try it like it with an ampersand before the amp;

    Moderator keesiemeijer

    (@keesiemeijer)

    Maybe this will help.

    you can force a ampersand by wrapping the entire esc_url_raw(…) function above in htmlentities(), but then the css file won’t be imported anymore ??

    looks like css import doesn’t accept html encoded characters.

    if you only want the html to validate, change the function above to:

    function mystique_load_stylesheets(){ ?>
    <style type="text/css">
     /* <![CDATA[ */
     @import "<?php bloginfo('stylesheet_url'); ?>";
     @import "<?php echo esc_url_raw(add_query_arg('mystique', 'css', (is_404() ? get_bloginfo('url') : mystique_curPageURL()))); ?>";
     /* ]]> */
    </style>

    I didn’t test it but it should work…

    Thread Starter mortifrog

    (@mortifrog)

    Sigh – the non validating XHTML was a red herring.

    I temporarily removed the line @import "<?php echo esc_url_raw(add_query_arg('mystique', 'css', (is_404() ? get_bloginfo('url') : mystique_curPageURL()))); ?>"; from settings.php

    The search results now validate – but I’m still having the disappearing videos problem. Doh – now I have two problems!

    weird, might be the search highlight js. try this:
    open functions.php file and comment out this line:
    add_action('mystique_jquery_init', 'mystique_highlight_search_query');

    then go back and make search in IE8 and see what happens

    Thread Starter mortifrog

    (@mortifrog)

    Thanks digitalnature (the author of Mystique I presume) – that works for the non validating xhtml – will you be including that hack in the next release of mystique so that I don’t have to do it again?

    I’m still getting the disappearing youtube videos problem though. Works fine in Firefox.

    Can anyone else confirm for me that videos in posts are disappeating in search results when using IE? I only have IE8 to to check with.

    It’s insane they appear when the page first loads, then promptly disappear. Meanwhile, the page loading hangs according to the status bar.

    Thread Starter mortifrog

    (@mortifrog)

    OMG – you are a genius! lol – are there any implications to commenting out that line?

    Will that also be fixed for the next release?

    Did you get my email regarding my suggestion of not showing tags in posts when there is only one tag – as it is silly to have a post linking just to itself?

    Thread Starter mortifrog

    (@mortifrog)

    Yes I see. The obvious implication is that the search term will not be highlighted. A slight shame, but I can live without it, not to have my videos disappearing.

    Thanks again. What a superstar you are!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Strange Mystique Search Results XHTML disappearing videos problem’ is closed to new replies.