• Resolved aditee

    (@aditee)


    Hello,

    My website Talisman-corporation.com was working properly some days back, but there were some plugin updates available so I just updated the plugin and since then the jobs on the Japanese page cannot be seen.

    My main target is to concentrate on the Japanese market and there are no jobs visible on the Japanese site.

    I have contacted the WPML support and they are trying from their side to sollve the issue but the error that occurs seems to be due to WP JOB MANAGER

    1 error: ajax-filters.min.js:1:2938
    2 https://talisman-corporation.com/wp-content/plugins/wp-job-manager/assets/js/ajax-filters.min.js?ver=1.28.0

    Can you please help me resolve this issue asap.

    Thank you,
    Aditee

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi, looks like I have a similar problem. Did you find a solution?

    Thread Starter aditee

    (@aditee)

    Hello,

    Yes I got a reply from WPML support team and they said they will be working on this and soon let me know if anything needs to be modified.

    But for now they have given me the following code to add to my theme functions.php and
    it works just fine for me.

    add_action(‘wp_footer’, function(){ ?>
    <script type=”text/javascript”>
    if (typeof job_manager_ajax_filters !== ‘undefined’ && job_manager_ajax_filters.hasOwnProperty(‘ajax_url’) && job_manager_ajax_filters.ajax_url.indexOf(‘http’) !== -1 ) {
    job_manager_ajax_filters.ajax_url = job_manager_ajax_filters.ajax_url.replace(‘https://&#8217;, ‘/’);
    }
    </script>
    <?php
    }, PHP_INT_MAX);

    Thanks aditee, also works for me!

    For anyone coping the hotfix make sure the correct single/double quotation marks are inserted. Maybe this codeblock will be better for copying:

    add_action('wp_footer', function(){ ?>
    <script type="text/javascript">
    if (typeof job_manager_ajax_filters !== 'undefined' && job_manager_ajax_filters.hasOwnProperty('ajax_url') && job_manager_ajax_filters.ajax_url.indexOf('http') !== -1 ) {
    job_manager_ajax_filters.ajax_url = job_manager_ajax_filters.ajax_url.replace('https://', '/');
    }
    </script>
    <?php
    }, PHP_INT_MAX);
    Plugin Contributor jonryan

    (@jonryan)

    @aditee glad you got this figured out, and thanks for posting the code!

    I have same problem after updating WPML.

    The fix above works only for listing page but not for image upload in job posting process.

    I found another fix for the problem but I just don’t like modifying plugin files.

    The file that I modified was \plugins\wp-job-manager\includes\class-wp-job-manager-ajax.php on line 71:
    Old:

    
    	public static function get_endpoint( $request = '%%endpoint%%', $ssl = null ) {
    		if ( strstr( get_option( 'permalink_structure' ), '/index.php/' ) ) {
    			$endpoint = trailingslashit( home_url( '/index.php/jm-ajax/' . $request . '/', 'relative' ) );
    		} elseif ( get_option( 'permalink_structure' ) ) {
    			$endpoint = trailingslashit( home_url( '/jm-ajax/' . $request . '/', 'relative' ) );
    		} else {
    			$endpoint = add_query_arg( 'jm-ajax', $request, trailingslashit( home_url( '', 'relative' ) ) );
    		}
    		return esc_url_raw( $endpoint );
    	}
    

    New:

    
    	public static function get_endpoint( $request = '%%endpoint%%', $ssl = null ) {
    		if ( strstr( get_option( 'permalink_structure' ), '/index.php/' ) ) {
    			$endpoint = trailingslashit( site_url( '/index.php/jm-ajax/' . $request . '/', 'relative' ) );
    		} elseif ( get_option( 'permalink_structure' ) ) {
    			$endpoint = trailingslashit( site_url( '/jm-ajax/' . $request . '/', 'relative' ) );
    		} else {
    			$endpoint = add_query_arg( 'jm-ajax', $request, trailingslashit( site_url( '', 'relative' ) ) );
    		}
    		return esc_url_raw( $endpoint );
    	}
    

    So I had to change all home_url to site_url.

    Does anyone have any suggestions how not to modify plugin files.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Jobs not displayed on japanese page’ is closed to new replies.