Home › Toolset Professional Support › [Resolved] Toolset Blocks or Views DESTROY buddypress group avatar upload form!
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Kolkata (GMT+05:30)
This topic contains 5 replies, has 2 voices.
Last updated by Minesh 4 months, 2 weeks ago.
Assisted by: Minesh.
Normally that form is
<form action="<em><u>hidden link</u></em>" name="group-settings-form" id="group-settings-form" class="standard-form" method="post" enctype="multipart/form-data"> <h2 class="bp-screen-title"> Ändere das Gruppen-Profilbild </h2> <p class="bp-help-text">Bearbeite oder aktualisiere dein Avatarbild für diese Gruppe.</p> <div class="bp-avatar-nav"><ul class="avatar-nav-items"><li class="avatar-nav-item current" id="bp-avatar-upload"> <a href="#" class="bp-avatar-nav-item" data-nav="upload">Hochladen</a> </li><li class="avatar-nav-item" id="bp-avatar-delete"> <a href="#" class="bp-avatar-nav-item" data-nav="delete">Löschen</a> </li></ul></div> <div class="bp-avatar"><div class="bp-uploader-window"> <div id="bp-upload-ui" style="position: relative;" class="drag-drop"> <div id="drag-drop-area" style="position: relative;"> <div class="drag-drop-inside"> <p class="drag-drop-info">Datei hierher ziehen</p> <p class="drag-drop-buttons"> <label for="bp-browse-button" class="bp-screen-reader-text"> Datei auswählen </label> <input id="bp-browse-button" type="button" value="Wähle deine Datei" class="button" style="position: relative; z-index: 1;"> </p> </div> </div> <div id="html5_1i3m9j46497u1g3v1h7p13k78p65_container" class="moxie-shim moxie-shim-html5" style="position: absolute; top: 68px; left: 228px; width: 150px; height: 19px; overflow: hidden; z-index: 0;"><input id="html5_1i3m9j46497u1g3v1h7p13k78p65" type="file" style="font-size: 999px; opacity: 0; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;" accept=""></div></div> </div></div> <div class="bp-avatar-status"><p class="warning">Wenn du das existierende Profilbild löschen, aber kein neues hochladen möchtest, benutze bitte den Löschen-Reiter. </p></div> <script type="text/html" id="tmpl-bp-avatar-nav"> <a href="{{data.href}}" class="bp-avatar-nav-item" data-nav="{{data.id}}">{{data.name}}</a> </script> <script type="text/html" id="tmpl-upload-window"> <div id="{{data.container}}"> <div id="{{data.drop_element}}"> <div class="drag-drop-inside"> <p class="drag-drop-info">Datei hierher ziehen</p> <p class="drag-drop-buttons"> <label for="{{data.browse_button}}" class="bp-screen-reader-text"> Datei auswählen </label> <input id="{{data.browse_button}}" type="button" value="Wähle deine Datei" class="button" /> </p> </div> </div> </div> </script> <script type="text/html" id="tmpl-progress-window"> <div id="{{data.id}}"> <div class="bp-progress"> <div class="bp-bar"></div> </div> <div class="filename">{{data.filename}}</div> </div> </script> <script id="tmpl-bp-avatar-item" type="text/html"> <div id="avatar-to-crop"> <img decoding="async" src="{{{data.url}}}"/> </div> <div class="avatar-crop-management"> <div id="avatar-crop-pane" class="avatar" style="width:{{data.full_w}}px; height:{{data.full_h}}px"> <img decoding="async" src="{{{data.url}}}" id="avatar-crop-preview"/> </div> <div id="avatar-crop-actions"> <button type="button" class="button avatar-crop-submit">Bild zuschneiden</button> </div> </div> </script> <script id="tmpl-bp-avatar-webcam" type="text/html"> <# if ( ! data.user_media ) { #> <div id="bp-webcam-message"> <p class="warning">Dein verwendeter Webbrowser unterstützt diese Funktion nicht.</p> </div> <# } else { #> <div id="avatar-to-crop"></div> <div class="avatar-crop-management"> <div id="avatar-crop-pane" class="avatar" style="width:{{data.w}}px; height:{{data.h}}px"></div> <div id="avatar-crop-actions"> <button type="button" class="button avatar-webcam-capture">Aufnehmen</button> <button type="button" class="button avatar-webcam-save">Speichern</button> </div> </div> <# } #> </script> <script id="tmpl-bp-avatar-recycle" type="text/html"> <div class="avatars-history"> <div class="avatar-history-list"> <table class="avatar-history-table"> <thead> <tr> <th>Profilbild</th> <th>Hochgeladen am</th> </tr> </thead> <tbody id="bp-avatars-history-list"></tbody> </table> </div> <div class="avatar-history-actions"> <p class="warning">Klicke auf ein Profilbild aus deinem Verlauf, um es als aktuelles Profilbild wiederzuverwenden.</p> <button class="avatar-history-action recycle disabled"> Recyceln </button> <button class="avatar-history-action delete disabled"> Löschen </button> </div> </div> </script> <script id="tmpl-bp-avatar-recycle-history-item" type="text/html"> <td> <label for="avatar_{{data.id}}"> <input type="radio" name="avatar_id" value="{{data.id}}" id="avatar_{{data.id}}" class="bp-screen-reader-text"/> <img decoding="async" src="{{{data.url}}}" id="{{data.id}}" class="avatar" width="50" height="50"/> </label> </td> <td> <span class="time">{{data.date}}</span> </td> </script> <script id="tmpl-bp-avatar-delete" type="text/html"> <# if ( 'user' === data.object ) { #> <p>Wenn du dein aktuelles Profilbild löschen möchtest, benutze den Profilbild-Löschen-Button.</p> <button type="button" class="button edit" id="bp-delete-avatar">Lösche mein Profilbild</button> <# } else if ( 'group' === data.object ) { #> <aside class="bp-feedback bp-messages info"> <span class="bp-icon" aria-hidden="true"></span> <p>Um ein Gruppenprofilbild zu entfernen ohne ein Neues hinzuzufügen, benutze bitte den Löschen-Button.</p> </aside> <button type="button" class="button edit" id="bp-delete-avatar">Profilbild der Gruppe löschen</button> <# } else { #> <# } #> </script> <input type="hidden" id="_wpnonce" name="_wpnonce" value="6984cc0177"><input type="hidden" name="_wp_http_referer" value="/gruppen/dragondreaming/admin/group-avatar/"> <input type="hidden" name="group-id" id="group-id" value="32"> </form>
With one of the above plugins - and no other besides buddypress and bp classic! - activated:
<form action="<em><u>hidden link</u></em>" name="group-settings-form" id="group-settings-form" class="standard-form" method="post" enctype="multipart/form-data"> <h2 class="bp-screen-title"> Ändere das Gruppen-Profilbild </h2> <p class="bp-help-text">Bearbeite oder aktualisiere dein Avatarbild für diese Gruppe.</p> <div class="bp-avatar-nav"></div> <div class="bp-avatar"></div> <div class="bp-avatar-status"><p class="warning">Wenn du das existierende Profilbild löschen, aber kein neues hochladen möchtest, benutze bitte den Löschen-Reiter. </p></div> </form>
Reported error:
Uncaught Error: Template not found: #tmpl-bp-avatar-nav template <em><u>hidden link</u></em> Backbone 2 Underscore 2 Backbone 3 addNavItem <em><u>hidden link</u></em> Underscore 2 initialize <em><u>hidden link</u></em> Backbone 4 setupNav <em><u>hidden link</u></em> start <em><u>hidden link</u></em> <anonymous> <em><u>hidden link</u></em> <anonymous> <em><u>hidden link</u></em> wp-util.min.js:2:371
Hello. Thank you for contacting the Toolset support.
Can you please share exact steps how Toolset is involved in this issue or exact steps in order to reproduce this issue.
Maybe you can share problem URL and admin access details and steps to see the issue.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
Yes - I can see the issue with the site you shared.
Here is a sandbox site and you can auto-login to it using the following link:
- hidden link
Where I've installed and activated the BuddyPress and its required plugins and created the following group and I can see the Photo section is working as expected:
- hidden link
Can you please try to reproduce the issue with the above sandbox site and share what are the steps I will have to follow in order to reproduce the issue.
Ok, We´re trying to.
BUT: You know much better, what toolset is doing behind the scenes...?
WHAT is toolset doing in buddypress pages?
... Somehow it seems to have to do with our attempt to get rid of those nasty auto paragraphs.
Tried that by adding to functions.php:
function remove_wpautop($content) { return do_shortcode(shortcode_unautop($content)); } add_filter('the_content', 'remove_wpautop', 9); add_filter('widget_text', 'remove_wpautop', 9); // Remove automatic paragraph tags in the content remove_filter('the_content', 'wpautop'); // Remove automatic paragraph tags in the excerpt remove_filter('the_excerpt', 'wpautop');
Removed this code, and voilà!
Can you see how this might cause our issue?
Does toolset rely on autoP?
Well - you may check or get help from buddypress to know how you can identify that you are on the buddypress Group Avatar page:
- hidden link
So you can conditionally handle those filters that if you are on Group Avatar page you should not apply the code you have currently otherwise you should apply.