Viewing 15 replies - 1 through 15 (of 34 total)
  • Plugin Author Maciej Bis

    (@mbis)

    Hi @ericafontimedia,

    The problem is caused by one of the Permalink Manager’s functions that parses the endpoints from the requested URL. Could you try to fix this issue by using the below code snippet?

    function pm_force_404_filter_endpoint( $element_id, $uri_parts ) {
    if ( ! empty( $uri_parts['endpoint'] ) && $uri_parts['endpoint'] == 'filter' && ! empty( $uri_parts['endpoint_value'] ) ) {
    $element_id = '';
    }

    return $element_id;
    }
    add_filter( 'permalink_manager_detected_element_id', 'pm_force_404_filter_endpoint', 100, 2 );

    Best regards,
    Maciej

    Thread Starter ericafontimedia

    (@ericafontimedia)

    Thank you for your advice. Unfortunately this didn’t solve the problem…

    Plugin Author Maciej Bis

    (@mbis)

    Hi @ericafontimedia,

    I think I made a small type in the code, could you try to use this version instead?

    function pm_force_404_filter_endpoint( $element_id, $uri_parts ) {
    if ( ! empty( $uri_parts['endpoint'] ) && $uri_parts['endpoint'] == 'filter' && empty( $uri_parts['endpoint_value'] ) ) {
    $element_id = '';
    }

    return $element_id;
    }
    add_filter( 'permalink_manager_detected_element_id', 'pm_force_404_filter_endpoint', 100, 2 );
    Thread Starter ericafontimedia

    (@ericafontimedia)

    nothing changed! 🙁

    Plugin Author Maciej Bis

    (@mbis)

    Just in case, the only difference is in the end of second line – the exclamation mark needs to be removed:

    Before:
    ! empty( $uri_parts['endpoint_value'] )

    After:
    empty( $uri_parts['endpoint_value'] )
    Thread Starter ericafontimedia

    (@ericafontimedia)

    Ok I’ve tried to delete the exclamation point but this didn’t solve the problem.

    Plugin Author Maciej Bis

    (@mbis)

    If the code still does not work, there are two possibilities – the code is inactive, or you removed the first exclamation mark instead of the last one. There were two exclamation marks in the second line – the first one should stay intact.

    If this does not help, please send me the screenshot with the fragment where the full snippet’s code was pasted.

    Thread Starter ericafontimedia

    (@ericafontimedia)

    I’ve copied it entirely from your post so I don’t thing this is the problem.

    I don’t really know why is it not working. Maybe could the problem be another?

    If it is a function of permalink manager isn’t there a way to modify it in the settings?

    Plugin Author Maciej Bis

    (@mbis)

    To provide more context, please make the screenshot from your admin dashboard with the section where the code snippet is inserted. You can upload it to e.g. https://imgur.com/

    Thread Starter ericafontimedia

    (@ericafontimedia)

    Of course, here you are: https://tinyurl.com/2ago26tl

    Plugin Author Maciej Bis

    (@mbis)

    Thank you, now I see where the problem is. The snippet does not work because the snippet is added as a HTML code.

    Could you change the snippet type to “PHP Snippet” here:

    or alternatively paste the code to the end of /wp-content/themes/hello-elementor-child/functions.php file?
    https://permalinkmanager.pro/blog/how-to-add-php-snippet-to-wordpress-3-methods/#3-how-to-insert-php-code-in-wordpress-without-plugin

    Thread Starter ericafontimedia

    (@ericafontimedia)

    Thank you, but unfortunately it didn’t solve it!

    Thread Starter ericafontimedia

    (@ericafontimedia)

    In reality something: the page is not working at all, now.

    Plugin Author Maciej Bis

    (@mbis)

    As I can see, the page returns 404 error and it works exactly the same way as when the plugin functions are conditionally deactivated:

    Permalink Manager disabled:
    https://ronb33.sg-host.com/de/schweisrauchabsaugung/filter/?disable-pm=1

    Permalink Manager enabled:
    https://ronb33.sg-host.com/de/schweisrauchabsaugung/filter/

    To confirm this and compare, please deactivate the plugin from “Plugins” dashboard and send me the screenshot with the content displayed on that specific page.

    • This reply was modified 3 weeks ago by Maciej Bis.
    Thread Starter ericafontimedia

    (@ericafontimedia)

    Hi,

    the same error 404 appear: https://tinyurl.com/28r5jjyt

    But with the plugin disabled also the other languages stop to work.

Viewing 15 replies - 1 through 15 (of 34 total)
  • You must be logged in to reply to this topic.