Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1272598

    Hi!!

    I have a problem, I don’t see images in the media library when the child theme is active. And when I want to insert an image in a page the image selector does not open.

    if I activate the parent theme I can see the images.

    Please, you don’t update the plugin Calendar

    Thank you,
    Maite

    • This topic was modified 4 years, 6 months ago by fusionweb.
    #1272613

    Hi Maite,

    Thanks for giving us admin and FTP access.
    I would suggest a troubleshooting step you can do to find out which file in your child theme is causing the issue (make sure any caching is off)
    Do these steps in your child theme:
    1. Change all the file extensions of the PHP files (except for functions.php) to .bup (for example footer.php to footer.bup) then check if the images show up.
    2. If it gets fixed, follow 2a, if not follow 2b.
    2a. Try to change the file extension back to .php, do this one by one, and check to know which one is causing the issue.
    2b. Comment out all of the codes in functions.php and check.
    3. If it gets fixed, uncomment each block of code to know which one is causing the issue.
    Hope this helps.

    Best regards,
    Nikko

    #1272657

    Hi!!

    The problem is this code in function.php:

    add_action(‘init’, ‘register_script’);

    • This reply was modified 4 years, 6 months ago by fusionweb.
    #1272676

    Hi fusionweb,

    We’re glad that you found the cause of the issue. :)
    Let us know if you need further assistance.

    Best regards,
    Nikko

    #1272744

    Hi!

    That line of code gives an error but I don’t know why, if I leave it commented, is there a problem?

    Maite

    #1273002

    Hi Maite,

    Yes, please try to post here the content of function register_script

    Best regards,
    Nikko

    #1273411

    Hi!!

    This is the code:

    function register_script() {
    global $wp_query;

    wp_enqueue_script( ‘ajax_js’, get_stylesheet_directory_uri() . ‘/js/ajax.js’, array( ‘jquery’ ), ‘1.0’, true);
    wp_localize_script( ‘ajax_js’, ‘ajaxpagination’, array(
    ‘ajaxurl’ => admin_url( ‘admin-ajax.php’ ),
    ‘query_vars’ => json_encode( $wp_query->query )
    ));
    }

    #1273552

    Hi fusionweb,

    Thanks for pointing it out.
    I have uncommented this code:

    add_action('init', 'register_script');

    Then commented some code in ajax.js and it worked properly, so I put all your js code inside a self-invoking function:

    (function () {
      // your code is inside here
    })();

    And it seems to work properly.
    Please review your site :)

    Best regards,
    Nikko

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.