• Resolved gualam

    (@gualam)


    Hi, I inherited this piece of code and I think it used to work a while ago but now it just doesn’t print anything, did something change in the latest updates that is preventing this code to work as expected? Apparently everything looks fine so I’m not sure what the issue might be:

    $fields = array(
        'send_email_for_each_registration',
        'send_email_for_each_member_post'
    );
    
    echo apply_shortcodes(
        sprintf(
            '[pods-form name="user" fields="%s" label="Update" id="{@user.id}"]',
            implode( ',', $fields )
        )
    );

    I am using the Version 3.0.10.

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Jory Hogeveen

    (@keraweb)

    Hi @gualam

    Did you update to the latest Pods version? And if so, please check the new security updates for forms and dynamic data since v3.1!

    https://pods.io/2024/02/21/pods-3-1-feature-release-access-rights-revamp/

    Cheers, Jory

    Thread Starter gualam

    (@gualam)

    Hello. We have already updated to the latest version and reviewing the security updates does not affect the problem raised above. Please can you help me validate why that code worked before and now it doesn’t. Thank you

    Plugin Author Scott Kingsley Clark

    (@sc0ttkclark)

    Can you fill out our official form for upgrade issues so we can more quickly assist you to resolve that?

    https://docs.pods.io/pods-upgrade-troubleshooting-and-priority-support/

    Plugin Support Paul Clark

    (@pdclark)

    I was also unable to get this to work, even after checking general security settings and Edit Pods > User > Access Rights and adding define('PODS_SHORTCODE_ALLOW_EVALUATE_TAGS', true);

    I have run into challenges using {@user.id} or {@user.ID} magic tags as a shortcode argument in the past.

    Below is a PHP version of the same thing that should not require any configuration or constants to work:

    <?php
    // @see https://docs.pods.io/code/pods/form/
    if ( is_user_logged_in() ) {
    echo pods( 'user', get_current_user_id() )->form(
    [
    'send_email_for_each_registration',
    'send_email_for_each_member_post'
    ],
    'Update'
    );
    }
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.