Home Forums Weaver Xtreme Theme issue with xtreme 3.1.11

Topic Resolution: Answered

This topic contains 21 replies, has 4 voices, and was last updated by  bochat 5 days, 12 hours ago.

Viewing 16 posts - 1 through 16 (of 22 total)
  • Author
    Posts
  • #53177
    Answered

    bochat
    Participant

    After todays upadating weaver xtreme the wordpress plugin Dynamic Headers by Nicasio Design doesn’t work anymore. No more header-images ! That is very annoying !  had to go back to previous xtreme theme.  It is not the weaver xtreme theme support but the theme itself. What can I do ?

    #53193

    Weaver
    Keymaster

    Sorry, that is intentional. Dynamic Headers has not been updated for SEVEN YEARS! It should not be considered safe to use at this point, and as part of a security review of Weaver Xtreme, we decided we should no longer support it.

    There may be other plugins that have an equivalent capability, but also Weaver Xtreme itself has all sorts of options to pick which header image to use.

    You can also make a child theme and add in the appropriate code described by Dynamic Headers.

    But ideally, I would look for an alternative plugin or method. Seven years is a very long time to go without an update.

    #53198

    scrambler
    Moderator

    You should explain the functionality you need, in case Xtreme actually has a way to do what you want without a plugin.

    #53209

    bochat
    Participant

    Weaver, if it was intentionnal, why didn’t you tell about, before suprising admins and visitors with desappearing header images.  I didn’t see a word in the “changes” for version 3.1.11 and I dont think, I was the only user of Dynamik Header !

    Scrambler, what I need is exactly what the plugin does (did) : give the possibility of random header images on a per page basis. I think, weaver xtreme can do that without a plugin, but not at all so easily. I have almost 400 header images on my site and puting them one by one in the customizer whill be tiresome ! Is there a way to copy all of them with FTP in one place, as with the plugin ?

    #53210

    Weaver
    Keymaster

    Are you using Weaver Xtreme Plus? I have an idea of adding a filter to the same place the specific call to dynamic images was before, and Weaver Xtreme would make that easy to do. There also is another plugin that allows you do define actions and filters.

    I’ll get this added to 3.1.12. Still uneasy about using a plugin that hasn’t been updated, but that would be your option.

    #53211

    Weaver
    Keymaster

    So, I’ve made a very easy fix – in Weaver Xtreme Version 3.1.12 to be released within an hour or two. You will simply need to add a WordPress action function. This can be done with Weaver Xtreme Plus (Advanced Options -> Actions and Filters), or using an old plugin: https://wordpress.org/plugins/add-actions-and-filters/ (it does seem to still work fine with WP 4.9.4).

    You could even add this via a child theme in the functions.php file.

    Then, simply create the action that consists of this code:

    function my_alt_header_image_action( ) {
         /* The Dynamic Headers shows headers on a per page basis - will also optionally add site link */
         if (function_exists('show_media_header'))
             show_media_header(); // Plugin support: **Dynamic Headers**
    }
    add_action( 'weaverx_alt_header_image', 'my_alt_header_image_action' );
    
    

    That’s it – pretty simple. You can even control where those images get added by setting the position of the Header Widget area – you don’t need widgets, just to define the position.

    #53215

    bochat
    Participant

    Thanks Weaver. Yes I have Plus. I created the action  (advanced options -> actions and filters) on a local site and it works .

    But on the real site fncta-midipy.fr, i have an error message : <b>Parse error</b>: syntax error, unexpected ”show_media_header\’)) ‘ (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) in <b>/datas/vol1/w4a130541/var/www/fncta-midipy.fr/wp-content/plugins/weaver-xtreme-plus/includes/weaver_xplus_runtime_lib.php(151) : eval()’d code</b> on line <b>3</b>

    What do that mean ?

    wordpress 4.9.4 weaver xtreme  3.1.12 xtreme theme support 3.1.11 weaver xtreme plus 3.1.1

    while waiting for your answer, I had to go back to xtreme 3.1.9

    #53227

    Weaver
    Keymaster

    It probably means the code did not get copied correctly into the actions and filters box – that some part had quotation marks changed or something else. Depending on how you do the copy, the characters can be modified for the paste.

    But it does look like something has been pasted into the real site’s actions and filters – but there is some PHP syntax error in the value.

    #53249

    bochat
    Participant

    I tried again in my local site and have now the same error. I copy/pasted that text in the actions and filter box :

    function my_alt_header_image_action( ) {
         /* The Dynamic Headers shows headers on a per page basis - will also optionally add site link */
         if (function_exists('show_media_header'))
             show_media_header(); // Plugin support: **Dynamic Headers**
    }
    add_action( 'weaverx_alt_header_image', 'my_alt_header_image_action' );
    
    The error message is :
    
    ( ! ) Parse error: syntax error, unexpected ''show_media_header\')) ' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) in D:\wamp\www\wp-content\plugins\weaver-xtreme-plus\includes\weaver_xplus_runtime_lib.php(151) : eval()'d code on line 3
    Call Stack
    # Time Memory Function Location
    1 0.0002 244136 {main}( ) ..\index.php:0
    2 0.0008 247176 require( 'D:\wamp\www\wp-blog-header.php' ) ..\index.php:17
    3 0.7870 62270248 require_once( 'D:\wamp\www\wp-includes\template-loader.php' ) ..\wp-blog-header.php:19
    4 0.7978 62667888 include( 'D:\wamp\www\wp-content\themes\weaver-xtreme\paget-posts.php' ) ..\template-loader.php:74
    5 0.7978 62668336 get_header( ) ..\paget-posts.php:17
    6 0.7978 62668416 do_action( ) ..\general-template.php:31
    7 0.7978 62669024 WP_Hook->do_action( ) ..\plugin.php:453
    8 0.7978 62669120 WP_Hook->apply_filters( ) ..\class-wp-hook.php:310
    9 0.7978 62669968 call_user_func_array:{D:\wamp\www\wp-includes\class-wp-hook.php:286} ( ) ..\class-wp-hook.php:286
    10 0.7979 62670320 weaverxplus_get_header_action( ) ..\class-wp-hook.php:286
    
    I really have not the competence to understand what is wrong and hope you can help

     

    #53256

    Weaver
    Keymaster

    I can’t reproduce this. I copied the code from your post just to be sure I used what you have.

    What version of PHP are you using?

    I cannot actually even get Dynamic Headers to work on any site I have because of PHP issues, but that should not have anything to do with what you are seeing.

    So, just one more thing to try – disable Dynamic Headers, then see if the action fails. I don’t know why it might be different, but it could be part of the issue. I tried with Dynamic Headers activated, but got errors from it and not the action we added.

    #53272

    bochat
    Participant

    Disabling Dynamic Headers doesn’t change the issue.

    I’m using PHP 7 for the online site and PHP 5.5 for the local site

    I tried again with the local site and now it works. But putting exactly the same code in the real site doen’t work ! I hope, at the end, you will find out what is going wrong

    I’m now trying to do the job without Dymanic Headers but I have not found a good solution yet. Dynamic Headers is a very good plugin and saying good bye makes me sad

    #53307
    Best Answer

    bochat
    Participant

    This reply has been accepted as the best answer.

    I tried to go back to PHP 5.5. on the real site, but have the same message. I can’t understand why it works on the local site and note on the real site. There must be a reason !

    Without a plugin, only with xtreme and xtreme plus features, it seems very complicated to me. I had a look on other plugins and the only one which seems to work is Unique headers. Have you or has anybody other suggestions ?

    #53385

    bochat
    Participant

    With the add actions and filters plugin you suggested earlier, it works ! There must be an issue with the xtreme’s actions and filters box. I tried twice with exactly the same code :  Dynamic Headers works when the action is added with the plugin and not when the action is added whith the actions and filters box. Perhaps you could see why it is so ? That could help others

     

    #53396

    Gillian
    Moderator

    It is related to the point at which the action/filter is acted upon in the page load sequence, but @weaver will have to give you the technical explanation 🙂

    #53400

    bochat
    Participant

    There is another problem. With the action the header image is on top of the page whith the site title under the image what is different from the normal working of dynamic headers. An Idea ?

    #53403

    scrambler
    Moderator

    We need a link to the site

Viewing 16 posts - 1 through 16 (of 22 total)

You must be logged in to reply to this topic.