BuddyDev

Search

Replies

  • Participant
    Level: Master
    Posts: 163

    I’ve been awake all night, and FINALLY found what was causing the problem, am sorry it’s taken so long, but it’s this

    https://wordpress.org/plugins/pb-seo-friendly-images/

    I had disabled it earlier as a test, but the button problem persisted. I did some other tests on this plugin and it is the one that is causing the problem. I made a note of when it was installed and when the problems started happening and they were roughly the same time.

    Sorry, but at least now you know what can break the submit code for Buddypress.

    Thanks for your investigation.

  • Participant
    Level: Master
    Posts: 163
    This reply has been marked as private.
  • Participant
    Level: Master
    Posts: 163

    I reverted back as you said, I found the plugin, this is what it shows on the edit profile page.

    https://pasteboard.co/HtyJTON.png

    As you can see it doesn’t show an uploader.php ?

    • This reply was modified 6 years, 5 months ago by Audiomonk.
  • Participant
    Level: Master
    Posts: 163

    No fatal error, it just worked??

    Can you give me more details of the “what the file” plugin?

    I’ll give you the details when I can run this.

  • Participant
    Level: Master
    Posts: 163

    See from the pastebin this is where the </label> was placed

    https://pasteboard.co/Htxk2fP.png

    What I did was move it here

    https://pasteboard.co/HtxkB9U.png

  • Participant
    Level: Master
    Posts: 163

    Hi,

    It’s not totally resolved, my cover image section doesn’t display anything now, but I can look at that another day.

    The code is different Brajesh, the closing </label> I put in a different place now just before the closing php tag on that line.

    There’s no drag and drop, but no one used that anyway. I’m just baffled as to why the code from the pastebin placed the </label> tag after the input when rendered which stopped things from showing?

    The uploader.php file is in the child theme folder in the correct hierarchy, it’s just it doesn’t render as it’s written, baffling.

    • This reply was modified 6 years, 5 months ago by Audiomonk.
  • Participant
    Level: Master
    Posts: 163

    Going to explain things in precise detail here. I did exactly as asked, but for some reason the </label> was being put after the <input id=” line. I don’t know why, but it was. It wasn’t a cache issue or anything else, for some reason, placing it where you said, when rendered it would find it’s way after the input id line. Even though it was before that in uploader.php.

    From the pastebin you have this code (also the default)

    <p class="drag-drop-buttons"><label for="{{data.browse_button}}" class="<?php echo is_admin() ? 'screen-reader-text' : 'bp-screen-reader-text' ;?>">
    
    <?php                    /* translators: accessibility text */
                            esc_html_e( 'Select your File', 'buddypress' );
                        ?></label><input id="{{data.browse_button}}" type="button" value="<?php esc_attr_e( 'Select your File', 'buddypress' ); ?>" class="button" /></p>

    I realised this was being rendered in the wrong place, so I moved the </label> to just before <?php /*translators line to see if that would make a difference, it did, it removed the input id line when rendered. Nothing there.

    So after a lot of experimenting today, I moved it to just before the closing php on the line after esc_html line, like this..

    /* translators: accessibility text */
    						esc_html_e( 'Select your File', 'buddypress' );
    					</label>?><input id="{{data.browse_button}}" type="button" value="<?php esc_attr_e( 'Select your File', 'buddypress' ); ?>" class="button" /></p>

    And it works for me, now I get a box saying choose file, then upload your file, but it works, and it also gives me a crop button afterward.

    This probably isn’t a good solution, but I’m happy because it works.

    I tried your solution and it didn’t work, I swapped themes, disabled caching at all levels, disabled plugins. I don’t know why your solution wasn’t working.

    Unfortunately, the cover image function doesn’t work, but that’s not important now.

  • Participant
    Level: Master
    Posts: 163

    Hi,

    The updates are working, I changed the code manually (see above to spell a word differently and it appeared on my screen straight away so no cache problem).

    Can you confirm that the code I posted at number #16198 above is the right code to fix the problem, as that is what it’s using and what the output was.

    I did check with other themes, problem is still there, ie no browse button. I tried twentysixteen and twentyseventeen.

    I can’t understand why it’s just this part of buddypress that doesn’t work, all the other parts seem to work correctly and display correctly.

    I just showed the code as a way to get the button to display, when I posted about this originally I think you said the problem was because of two incorrect overflow:hidden commands. (see original thread linked to in first post).

    Could you just confirm that it’s the correct code as I’ve pasted in post #16198 ?

  • Participant
    Level: Master
    Posts: 163
    .bp-screen-reader-text {
        /* clip: rect(1px,1px,1px,1px); */
        height: 1px;
        /* overflow: hidden; */

    If I comment out those two lines, the button and the text appear, but after the image upload the crop button isn’t visible.

  • Participant
    Level: Master
    Posts: 163
    <div class="drag-drop-inside">
    					<p class="drag-drop-info"><?php esc_html_e( 'Droooop your file here', 'buddypress' ); ?></p>
    					<p><?php _ex( 'or', 'Uploader: Drop your file here - or - Select your File', 'buddypress' ); ?></p>
    					<p class="drag-drop-buttons"><label for="{{data.browse_button}}" class="<?php echo is_admin() ? 'screen-reader-text' : 'bp-screen-reader-text' ;?>"><?php
    						/* translators: accessibility text */
    						esc_html_e( 'Select your File', 'buddypress' );
    					?></label><input id="{{data.browse_button}}" type="button" value="<?php esc_attr_e( 'Select your File', 'buddypress' ); ?>" class="button" /></p>
    				</div>

    This is the code I have in my child theme uploader.php (notice I spelt drop Droooop, this is to check the file in the child theme folder is being used not the standard Buddypress one). So, it’s NOT getting cached. As far as I can see the code above is the code you’ve asked me to use from the pastebin. So, it’s being used and still no button?

    <label for="bp-browse-button" class="bp-screen-reader-text">Select your File<input id="bp-browse-button" type="button" value="Select your File" class="button" style="position: relative; z-index: 1;">
    				</label>

    This is the html from the inspector for that page, which looks correct?

    This is driving me crazy, I can alter the CSS of mediapress.min.css and add some CSS in the customiser to get this button to show, but it messes up other things. I just need a solution. I’ve replaced the code you suggested in the child theme area (which is being read). I also renamed this so it used standard BP and it still did the same thing no button. Spent a lot of time disabling caches to see if that was causing the issue. Spent all day on this, and still not working.