Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @besky,

    I gave a quick test but I’m not able to replicate such a behaviour in my test site.

    However, I also tested on your mentioned page and the URL to the PDF file did load fine with only https as its URL when tested.

    Is the issue sorted? If not, could you please clear the browser cache and then check whether you are able to replicate the same issue?

    If you still have issues regarding this then please do let us know on which Browser you are testing and the Operating System and its version.

    If you could also share the form export the better. Please check the following doc on how to export a form:
    https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#import-export

    If you are concerned about any sensitive information in the form, then you can duplicate your form, remove any sensitive information, and then export it.

    You can share the export file via Google Drive, Dropbox or any cloud service in the next reply.

    Looking forward to your response.

    Best Regards,

    Nithin

    Thread Starter Bessonweb

    (@besky)

    Hi and thank you for your reply,

    You can find the export here : https://drive.google.com/file/d/1Aya4MwwhUK0Zd0PYlEToT0DwMlh6R54k/view?usp=sharing

    And this code in my functions.php :

    <?php
    /* Replace variable with data in forminator */
    add_filter('forminator_field_markup', function( $html ) {
    
      // The file to download in landing pages
      if ( get_post_type( get_the_id() ) == 'landing' ) {
    
        $file_url = get_field('fichier', $post_id);
    
        if ( ! empty( $file_url ) ) {
    
          $html = str_replace( '%file_url%', $file_url, $html );
    
        }
      }
    
      return $html;
    }, 99);
    ?>

    Note that the url in the confirmation email is ok and work good.

    Have a good day!

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @besky,

    I could notice what you have mentioned with the given snippet, I’m checking with our developer regarding the expected behaviour in such use case.

    Will keep you posted once we get further feedback asap.

    Best Regards,

    Nithin

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @besky,

    On checking further, I’m afraid this seems more of a bug. I can confirm its being already being investigated so that it could get fixed asap.

    In the meanwhile, you can try the following snippet as a workaround to resolve the issues noticed.

    <?php
    
    add_filter( 'forminator_form_submit_response', 'wpmudev_fix_response_url_redirect', 20, 2 );
    add_filter( 'forminator_form_ajax_submit_response', 'wpmudev_fix_response_url_redirect', 20, 2 );
    function wpmudev_fix_response_url_redirect( $response, $form_id ) {
    	if ( $form_id != 2350 ) { //Please change the form ID
    		return $response;
    	}
    
    	if ( ! empty( $response['url'] ) ) {
            $response['url'] = urldecode($response['url']);
            $pos = strpos($response['url'], 'https://');
            if ( $pos !== false ) {
                $response['url'] = substr_replace($response['url'], '', $pos, strlen('https://'));
            }
    	}
    
    	return $response;
    }

    You’ll have to update the line in the above code with your form ID ie:

    if ( $form_id != 2350 ) { 

    Suppose the form ID is 123, then the above line will change as below:

    if ( $form_id != 123 ) { 

    The code can be added as a mu-plugins. Please check this link on how to implement the above code as a mu-plugins:
    https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins

    Best Regards,

    Nithin

    Thread Starter Bessonweb

    (@besky)

    Hi @nithin,

    Thank you for your tips. For the moment I have rollbacked to the 1.26.0. Do you think it would take many time to be resolved?

    Have a good day!

    Plugin Support Jair – WPMU DEV Support

    (@wpmudevsupport15)

    Hi @besky,

    I hope you are doing well today!

    We don’t have any estimated time for the fix but our Forminator team will be working on the issue and the fix will be included in the upcoming releases.

    Please subscribe to our roadmap on https://wpmudev.com/roadmap/ to receive the details on each update and also check the changelog in https://www.ads-software.com/plugins/forminator/#developers

    Thank you for your patience.

    Kind regards,
    Zafer

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi

    Since we have identified this as a bug and we can acknowledge this will be fixed in a future update, I’ll mark it as resolved for now.

    For now, you could consider using the custom snippet as suggested before if you are looking to use the latest version.

    However, for any new feature updates, you can get updates on our progress by subscribing to our roadmap at https://wpmudev.com/roadmap/

    Once new versions are released, any pertinent changes will be described in the changelog, which you can find at:

    https://www.ads-software.com/plugins/forminator/#developers

    Kind Regards,

    Nithin

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Redirection to PDF file breaked since 1.27.0’ is closed to new replies.