This thread is resolved. Here is a description of the problem and solution.

Problem: Internal Server error after submitting the Ninja Forms(which has redirection after submission) from a secondary language

Solution: This issue is happening because of a compatibility issue. It happens when the theme is Pimp or it child theme. It works after the following change in a Pimp theme file.

1) Visit wp-content/themes/pimp/framework/post-type folder
2) Open portfolio-options.php file for edit
3) Scroll to line 40 and make the following change

From

add_action('admin_init', 'tt_theme_settings_flush_rewrite');

To

if (!defined('DOING_AJAX')) {
    add_action('admin_init', 'tt_theme_settings_flush_rewrite');
}

4) Save the changes
5) Then fill the form from secondary language

Relevant Documentation:

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 19 replies, has 2 voices.

Last updated by Apulia Vending s.r.l. 1 year, 9 months ago.

Assigned support staff: Bigul.

Author Posts
September 24, 2018 at 12:18 pm #2760417

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

For your kind information, our compatibility team is still working on this issue. I will get back to you soon when we have an update from our compatibility team. Please wait.

--
Thanks!

Bigul

September 27, 2018 at 2:19 pm #2770810

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

For your kind information, our compatibility team has found a workaround to fix the issue. Please try the following steps after a site backup and make sure the issue is existing or not.

1) Visit wp-content/themes/pimp/framework/post-type folder
2) Open portfolio-options.php file for edit
3) Scroll to line 40 and make the following change

From

add_action('admin_init', 'tt_theme_settings_flush_rewrite');

To

if (!defined('DOING_AJAX')) {
    add_action('admin_init', 'tt_theme_settings_flush_rewrite');
}

4) Save the changes
5) Then fill the form from secondary language

--
Thanks!

Bigul

September 27, 2018 at 2:40 pm #2770894

Apulia Vending s.r.l.

Hello Bigul,
thank you so much for your kind help. I just made the changes you suggested, now everything works fine.

May I ask you if you will fix this in the next WPML update?

September 28, 2018 at 7:09 am #2772717

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for confirmation. The fix has to be implemented in *Pimp* theme file. Our compatibility team will update them about this. Hope they will implement the changes.

--
Thanks!

Bigul

September 28, 2018 at 2:02 pm #2774145

Apulia Vending s.r.l.

Hi Bigul,
thank you so much for your kind help and for your explanation.

Kind regards