arnefallisch
Forum Replies Created
-
Dear @aswingiri
I added a nonce field by adding the code
$output .= '<input type="hidden" name="um_account_nonce_'. esc_attr( 'miapunittab' ).'" value="'.esc_attr( wp_create_nonce( 'um_update_account_miapunittab' ) ).'" />';
Now I get a positiv notification “Your accout was updated successfully”. However the values are not stored in Pods.
I also added a custom profile tab with the same Pods shortcode. In this case it works.
Best regards,
ArneForum: Plugins
In reply to: [Pods - Custom Content Types and Fields] Pods Form in Ultimate MemberForum: Plugins
In reply to: [Pods - Custom Content Types and Fields] Pods Form in Ultimate MemberHi @keraweb
I tried something else. I turned on the WP Debug Log instead of showing it directly and now I receive the eroor in the log
Undefined index: um_account_nonce_miapunittab in /var/www/miap.eu/wp-content/plugins/ultimate-member/includes/core/um-actions-account.php on line 20
I this line 20-22 I got the following code:
if ( ! wp_verify_nonce( $args[ 'um_account_nonce_' . $tab ], 'um_update_account_' . $tab ) ) { UM()->form()->add_error( 'um_account_security', __( 'Are you hacking? Please try again!', 'ultimate-member' ) ); }
Forum: Plugins
In reply to: [Pods - Custom Content Types and Fields] Pods Form in Ultimate MemberHi @keraweb
sorry for the misunderstanding but of course I enable the WP Debug, but it shows no errors at all. I think it must have something to do with how the ultimate member plugin calls the function containing the form.
Best regards,
ArneForum: Plugins
In reply to: [Pods - Custom Content Types and Fields] Pods Form in Ultimate MemberHi @keraweb
actually there is no error message from WordPress only the a red marked Box that states:
An error has been encountered!
Best regards,
ArneForum: Plugins
In reply to: [Pods - Custom Content Types and Fields] Pods Form in Ultimate MemberHi @keraweb,
I understand what you mean now. Unfortunately that does not solve the problem. The error is still the same.
Best regards,
ArneForum: Plugins
In reply to: [Pods - Custom Content Types and Fields] Pods Form in Ultimate MemberHi @keraweb
when I do not use ob_start the form appears over of the ultimate member account tab. But I want it to appear right next to it on the rigth side. Therefore I have to use ob_start. The Pods form also shows a loading sign at the button between the last entry and the button, although it is completely loaded. The saving of the entries does not work anymore. The message that states “An error has been encountered” appears after submitting the form.
Here is a link to the testpage of the form, where it works just fine (not a part of the ultimate member plugin):
Here is the full code of the function if that helps:
/* content in the miapunittab */ add_filter('um_account_content_hook_miapunittab', 'um_account_content_hook_miapunittab'); function um_account_content_hook_miapunittab( $output ){ ob_start(); $user = wp_get_current_user(); $args = array( 'post_type' => 'miap-unit', 'author' => $user->ID, 'posts_per_page' => -1, 'post_status' => 'publish' ); $query = new WP_Query($args); if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); $miap_unit = pods('miap-unit', get_the_ID()); $fields = array( 'unit-alert-title', 'unit-alert', 'unit-news-title', 'unit-news', 'unit-abbreviation', 'unit-affiliation', 'unit-zip-code', 'unit-city', 'unit-street', 'unit-street-number', 'unit-phone-number', 'unit-fax-number', 'unit-email', 'unit-homepage', 'unit-booking-page', 'unit-by-train', 'unit-by-car', 'unit-by-car', 'unit-description', 'unit-thumbnail', 'unit-logo'); echo get_the_title() . '<br />'; // Output a form with specific fields echo $miap_unit->form($fields); endwhile; endif; $output .= ob_get_contents(); ob_end_clean(); return $output; }
Best regards,
Arne- This reply was modified 3 years, 1 month ago by arnefallisch.
- This reply was modified 3 years, 1 month ago by arnefallisch.
Forum: Plugins
In reply to: [Pods - Custom Content Types and Fields] Pods Form in Front End not showingHello @keraweb
I do not have any console errors but I found the problem. I use the Autooptimize Plugin and have the “Optimize JavaScript Code?” option enabled. If I disable this option, the fields are shown.
Best regards,
Arne