Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 6 replies, has 0 voices.

Last updated by ericH-23 1 day, 23 hours ago.

Assisted by: Bigul.

Author Posts
December 16, 2024 at 8:56 am #16516261

ericH-23

Hi,
I discovered, that here the same error is at the resume manager, so the resumes are also duplicated like the jobs and if they are deleted in the frontend, only the current is deleted and not the copies, like at the jobs.

Do you have here a code also for resumes? And would you please escalate this also, because it is the same topic?

Or shall I show this in the sandbox also?

Thanks, kind regards
Eric

December 16, 2024 at 9:33 am #16516391

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

Welcome to the WPML support forum. I will do my best to help you to resolve the issue.

I am not able to access the Resume Manager features in the sandbox site now. So can you please activate it? Refer to the attached image for more details. It will help us to debug it further.

hidden link

hidden link

--
Thanks!

Bigul

2024-12-16_15h00_17.png
December 16, 2024 at 12:02 pm #16517074

ericH-23

Hi,
OK, I added the resume manager and set up candidate dashbord, resumes and add resume pages and translated them, then I added a resume and delete it in the frontend.
The other languages are not deleted.
If a resume is deleted in the frontend, his translations or translated duplicates must be also deleted, right?
Please check, thanks, kind regards
Eric

December 17, 2024 at 8:51 am #16520370

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hi Eric,

Thank you for the updates and for reproducing the bug in the Sandbox site. I can reproduce the issue when deleting the Resume post from the Candidate Dashboard - hidden link

We will test it further and get back to you as soon as possible. Please wait.

--
Thanks!

Bigul

December 19, 2024 at 5:03 pm #16531244

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hi Eric,

We are getting the expected results in the sandbox site after the following steps. Please try it after a full site backup {mandatory} and let us know your feedback.

1) Visit */wp-content/plugins/wp-job-manager-resumes/includes/* folder
2) Open the *class-wp-resume-manager-shortcodes.php* file for edit
3) Scroll down to line number 125
4) Make the following changes and save the file

From

case 'delete':
// Trash it.
wp_trash_post( $resume_id );

To

				case 'delete':
					// Trash it.
					// WPML workaround for compsupp-7757
					$trid = apply_filters( 'wpml_element_trid', NULL, $resume_id , 'post_resume' );
					$translations = apply_filters( 'wpml_get_element_translations', NULL, $trid, 'resume' );
					if ( !empty( $translations ) ) {
						foreach ( $translations as $lang => $translation ) {
							$translation_id = absint( $translation->element_id );
							wp_trash_post( $translation_id );
						}
					}			

Please note that this workaround will delete translations, irrespective of the "When deleting a post, delete translations as well" option.

--
Thanks!

Bigul

December 20, 2024 at 4:46 pm #16535022

ericH-23

Hi Bigul,
Thanks, this is working! Are you in contact with WP Jobmanager to take this over or do you have another idea to make this update save?
Thanks a lot, kind regards
Eric

December 20, 2024 at 6:42 pm #16535257

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hi Eric,

Thank you for the feedback. Happy to know you are getting the expected results now. Our compatibility team is in touch with WP Jobmanager developers. Hope this fix will be included in their future versions.

--
Thanks!

Bigul

December 20, 2024 at 8:46 pm #16535404

ericH-23

Thanks, great