Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1214039

    My problem same as https://kriesi.at/support/topic/button-link-option-display-error-after-copy-to-other-language-using-wpml/

    I resolve this problem by

    \enfold\config-templatebuilder\avia-template-builder\php\html-helper.class.php

    Under this line
    $selected = ( ( $new_std[0] == $post_type ) && isset( $new_std[1] ) ) ? $new_std[1] : 0;

    add
    $selected = apply_filters(‘wpml_object_id’, $selected, $new_std[0], true );

    the enfold version is 4.6.1

    But I recently upgraded the enfold and wordpress versions, and this problem appeared again.

    Wordpress 5.4.1
    enfold 4.7.3

    Can you help me, thank you

    #1215966

    HI~ Please help me.

    #1216458

    Hi,

    Thank you for the info.

    What does the changes fix exactly? As stated on the previous thread, we were not able to reproduce the issue, so we are not entirely sure what needs fixing. Could you explain it a bit?

    Best regards,
    Ismael

    #1220824

    HI
    we can reproduce the issue.

    • This reply was modified 3 months, 2 weeks ago by  decode.
    #1222592

    HI~ Please help me.

    #1222637

    Hi,

    Sorry for the delay. We’ll forward these changes to our channel and hopefully add it in the next patch.

    Thank you for your patience.

    Best regards,
    Ismael

    #1223034

    HI~ Thank you for your reply, how long can we get the patch file ?

    #1223732

    Hi,

    We are not really sure about that. You will have to do the modification manually for now.

    Best regards,
    Ismael

    #1224024

    Can you provide patched code?

    #1224525

    Hi,

    We haven’t really looked into the issue because we can’t reproduce it, so we’ll probably add the changes based on what you provided above. Have you tried it again?

    This is the \enfold\config-templatebuilder\avia-template-builder\php\html-helper.class.php file with the modification based on what you described above.

    // https://pastebin.com/43xhHiYr

    Best regards,
    Ismael

    #1225779

    Hey!

    I was informed that the patch was already added in the theme and a filter is also available if you need to modify it. The filter is called avf_alb_options_select_hierarchical_post_type_id, and the patch is inside the wp-content\themes\enfold\config-wpml\config.php file.

    /**
    		 * Fixes problem with links to posts/pages in ALB elements in modal popup in backend (reported and provided by WPML comp. team)
    		 * 
    		 * @since 4.5.7.2
    		 * @param int $selected_id
    		 * @param string $object_type			'page' | 'post' | 'category' | ......
    		 * @param array $option_selected
    		 * @param array $element
    		 * @return int
    		 */
    		function avia_wpml_alb_options_select_hierarchical_post_type_id( $selected_id, $object_type, array $option_selected, array $element )
    		{
    			$selected_id = apply_filters( 'wpml_object_id', $selected_id, $option_selected[0], true ); 
    			return $selected_id;
    		}
    		
    		add_filter( 'avf_alb_options_select_hierarchical_post_type_id', 'avia_wpml_alb_options_select_hierarchical_post_type_id', 10, 4 );
    

    Best regards,
    Ismael

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.