About translate using WPML

Hi!

The countries you told me and some else had been added to my list to access to the my website. If you can’t access yet, tell me from where you are doing and I will add that country too.

Thank you so much.

Kind regards.

Hey Jorge,

Another support staff from the Philippines here and wp-admin is still inaccessible due to too many redirections. It’s the same as what Jade shown previously.

Please have your host fix this first.

------------------------------------------------------------

I just want to point out a possible solution to the issue. Your Spanish page leads to a 404 page so that means it doesn’t exist. Did all the pages you translated lead to a 404 page? If so, you might be having a conflict with your WPML permalink setup. Try resetting your permalinks by going to Settings > Permalinks and click the Save Changes button.

Thanks.

Hi!

Im going to tell with my hosting support team and send them this picture (and message). Respect of the 404 page, I use the same one to the spanish and english version. Even so, I will disable this redirection (I use a plugin for this) to avoid issues.

Please, try again when you can (Philippines is included in the my list to access).

Thank so much!

Hey Jorge,

Thanks for fixing the redirection issue. I was able to log in.

I checked your pages and https://www.talentchef.com/ofertas-fb/ doesn’t really exist. The translated page by Cornerstone is this https://www.talentchef.com/ofertas-de-fb/. Notice the difference between ofertas-fb and ofertas-de-fb

I’m not sure how you arrived at the wrong URL but just use the translation flags and also the link to the live page (see screenshots below).

image

image

With all that said, I find no issue with Cornerstone and WPML.

Hope that helps.

Hi!

I don’t understand. The original page (it was created 1 year ago) it’s https://www.talentchef.com/ofertas-de-fb/. I installed WPML plugin three weeks ago, and I could translate every page without trouble. Within this page and the english version (https://www.talentchef.com/en/fb-offers/), I use a WP Job Manager plugin by a code [jobs] to show a job list, but it doesnt show like the original version (spanish).

I don’t have the flag language showed. You can check the website in spanish with: www.talentchef.com: and in english with www.talentchef.com/en/.

The issue is when I try to show the job list in https://www.talentchef.com/ofertas-de-fb/

and https://www.talentchef.com/en/fb-offers/.

It’s not the same structure, why? I translated the page well (WPML helped me to do it. They and WP Job Manager support team told that issue is related with the theme).

Thank you.

I hope you can help me!

Hello Jorge,

It loos like the IP restriction is up again because I am not able to access the admin login page:

As for the difference between the Spanish and English pages, the English page looks different because some of the resources such as CSS codes that should be loaded by the WP Job Manager plugin is not loaded on the English pages.

Please note that it could be possible that it is a conflict between the WP Job Manager and the WPML plugin. However, this is not something we can confirm since I am not able to access the backend of your site.

You mentioned that WP Job Manager mentioned that it is a theme issue. Would you mind providing specific details on what we can look into on our end as advised by WP Job Manager?

Thank you.

Hi!

The restriction is disabled (maybe, the country you are trying to access is not in my list, but in this one there are the many countries).

The web it’s the same as in spanish version as english version.

WPML support team could access to my web and they said that the error would be in the theme, probably. Im going to send your message (about CSS) to the WP JOB MANAGER support team.

Please, try to access to my web when you can.

Thank so much.

Kind regards.

Hi Jorge,

I’m able to access your site now, I checked and the translation works okay from those pages. The problem with the form is the CSS isn’t loaded on English page. If you’ll examine the sourc code of both page, this line is missing from English page

<link rel='stylesheet' id='wp-job-manager-frontend-css' href='https://www.talentchef.com/wp-content/plugins/wp-job-manager/assets/css/frontend.css?ver=1.34.1' type='text/css' media='all' />

I activated another theme and this issue is still present, perhaps you can contact the plugin author to see how if there are needed integrations for the CSS/Script especially for language dependent pages?

Thanks!

Hi @rad!

I sent this message to WPML support team, and they answer me this (he tested the website and the issue again):

it is not strictly appended to X theme or language, but on the Cornerstone page builder and WP Job Manager shortcode.

  • If I put to any page [jobs] shortcode via Gutenberg, it loads correctly style everywhere.

  • If I put [jobs] shortcode via Cornerstone, it loads the correct style only on the page that has been selected in Job Listing>Settings>Pages. Missing /wp-job-manager/assets/css/frontend.css.

  • WP Job manager CSS should be loaded on every page where the shortcode is added, correct when using Gutenberg but that is not the case when using Cornerstone

  • all WPML plugins disabled

With page built with Cornerstone not loading shortcode CSS correctly.

Could you help me to resolve this in some way? I love my website and my builder page, and I want to change anything (in Spanish version everything works well).

I hope your help!

Kind regards.

Hi Jorge,

Thank you for sharing the details of the investigation. Since the issue is a confirm conflict between WP Job manager and Cornersone builder, unfortunately at this moment you might need to consult a web developer to fixed it.

Third party plugin is outside the scope of our support. I do understand the frustration at this moment with so many back and forth, but as stated we are always here to support and guide on all theme features and function only. For us to fixed it means we need to study the third party plugin code to checked where the conflict is happening. Since we don’t have control on how a third party plugin works, it is strictly out of scope. Thank you for understanding.

Hi @lely

But, the problem is related to the theme. Why the theme can not show this shortcode? With other themes works well, but with this one there is this issue. In previous posts, the support team helped me with codes (about CSS) to resolve my problems (there were similar to this one).

Who then can help me with this from the theme support team?

Thanks.

Kind regards.

Hi Jorge,

I’ve been in touch with WPML developer as well, this is not a theme or cornerstone issue but just lacks of integration between the two (WP Job Manager and Cornerstone). All I could do is add this as a feature request on our end.

This is what really happening,

1) If there is no assigned listing page in Admin > Job Listings > Settings > Pages, it automatically enqueues all resources globally
2) If there is assigned listing page, then:
a) It enqueue the resources for that assigned page
b) It enqueue the resources based on the presence of the shortcode for non-assigned pages

The WP Job Manager fails on 2)b), the reason for that is, instead of loading the resources globally similar to 1), it decided to check the presence of [jobs] on non-assigned pages. And this code is from WP Job plugin itself

/**
		 * Filter whether to enqueue WPJM core's frontend scripts. By default, they will only be enqueued on WPJM related
		 * pages.
		 *
		 * If your theme or plugin depend on `frontend.css` from WPJM core, you can use the
		 * `job_manager_enqueue_frontend_style` filter.
		 *
		 * Example code for a custom shortcode that depends on the frontend style:
		 *
		 * add_filter( 'job_manager_enqueue_frontend_style', function( $frontend_used_on_page ) {
		 *   global $post;
		 *   if ( is_singular()
		 *        && is_a( $post, 'WP_Post' )
		 *        && has_shortcode( $post->post_content, 'resumes' )
		 *   ) {
		 *     $frontend_used_on_page = true;
		 *   }
		 *   return $frontend_used_on_page;
		 * } );
		 *
		 * @since 1.30.0
		 *
		 * @param bool $is_frontend_style_enabled
		 */
		if ( apply_filters( 'job_manager_enqueue_frontend_style', is_wpjm() ) ) {
			wp_enqueue_style( 'wp-job-manager-frontend', JOB_MANAGER_PLUGIN_URL . '/assets/css/frontend.css', [], JOB_MANAGER_VERSION );
		} else {
			wp_register_style( 'wp-job-manager-job-listings', JOB_MANAGER_PLUGIN_URL . '/assets/css/job-listings.css', [], JOB_MANAGER_VERSION );
		}

The enqueue condition is_wpjm() fails to check the presence of [jobs] within the cornerstone content. And to explain that further even without cornerstone, let’s say you added [jobs] within another shortcode, like [a_sample_shortcode], then any plugin or even WP Job Manager will fail to check what’s added within [a_sample_shortcode], it can’t tell wether [jobs] exists within.

And now back to cornerstone, its contents are set of shortcodes within shortcodes, hence fails. Question is, why WP Job Manager won’t just load the resources like CSS globally regardless of page similar to 1)? I can’t answer that, but they provide a hook that may able to fix it. For example

add_filter('job_manager_enqueue_frontend_style','__return_true');

And it can be added to child theme’s functions.php, the usage is also explained from their own codes as I provided above. Again, what’s needed for this is integration between the two plugins, as a new feature since that is how they implemented their enqueue conditions.

Thanks!

Hi @rad!

The WPML support team told me they had spoken with you. Thank so much for your response. So, will you fix this with the support team? As I mencionated before, this is a most important section of my website.

It’s strange, because with other themes works correctly, how it’s possible?. I hope you can fix this issue as soon as possible. I noticed about this to the WP JOB MANAGER support team. So, while you try to fix this, what can I do to show correctly my job listing? Do you know something?

I hope your help!

Kind regards.

Hi Jorge,

This is not an issue to fix, but an integration to implement on either side (WP Job Manager or Cornerstone). I already added this as a feature request. As I mentioned, this is WP Job Manager’s limitation that’s why they also provided a hook needed for integration, 'job_manager_enqueue_frontend_style'.

To answer this,

It’s strange, because with other themes works correctly, how it’s possible?.

I already explained above :slight_smile: ,

And to explain that further even without cornerstone, let’s say you added [jobs] within another shortcode, like [a_sample_shortcode] , then any plugin or even WP Job Manager will fail to check what’s added within [a_sample_shortcode] , it can’t tell wether [jobs] exists within.

And now back to cornerstone, its contents are set of shortcodes within shortcodes, hence fails. Question is, why WP Job Manager won’t just load the resources like CSS globally regardless of page similar to 1) ? I can’t answer that, but they provide a hook that may able to fix it. For example

Other theme doesn’t use shortcodes as builder’s content structure that’s why it works on them, but our theme uses cornerstone in which wraps the content with another set of shortcodes, that’s why it fails. Hence [jobs] falls behind another shortcode in which WP Job Manager can’t look into, “oh, no jobs shortcode here, okay don’t load the CSS” :slight_smile: Example, this is a shortcode generated by cornerstone (Edit with Wordpress).

image

As you can see, I added [jobs] in cornerstone, but try searching it from that generated shortcodes on my screenshot. It’s not there even if you search it manually because [jobs] is within [cs_element_text _id="5" ].

I recommend contacting WP Job Manager to get a temporary workaround/fix since it’s them that provides the usage on how to fix it based on their own code.

/**
 * If your theme or plugin depend on `frontend.css` from WPJM core, you can use the
		 * `job_manager_enqueue_frontend_style` filter.

Then we’ll check what’s needed to be done on our side, but I can’t promise any immediate solution as this simply a new feature implementation and not a bug. But, this may help as a guide

add_filter('job_manager_enqueue_frontend_style','wp_job_manager_load_css');

function wp_job_manager_load_css ( $load_it ) {

return is_page(  array ( 2323, 2322, 2324 ) ) ? true : $load_it;

}

You can add that code to your child theme’s functions.php, not the main theme but child theme. This is just the idea and we don’t provide support or maintain that code. The 2323, 2322, 2324 are page IDs, please check this https://theme.co/docs/how-to-locate-post-ids on how to get those IDs. That’s how WP Job Manager wanted it, it’s just that other themes content is easily accessible since they don’t used shortcodes within shortcodes.

Thanks!

Hi @rad!

Ok! I will be waiting for you until you make the updates between the theme and plugin (WPJM) to resolve the “problem”.

Also, I’m going try the solution you told me in your last post.

Thank so much.

Kind regards.

You are most welcome!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.