BuddyDev

Search

[Resolved] Browse profile pic and crop fixed and broken!

  • Participant
    Level: Master
    Posts: 163
    Audiomonk on #16194

    Ok, will disable the captcha

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #16195

    Thank you. I am in. I still see the same html issue.

    Pleas override the upload.php like earlier in your child theme and replace its content with this one

    https://pastebin.com/ApehSKFK

    Let me know once you are done with it.

    Regards
    Brajesh

  • Participant
    Level: Master
    Posts: 163
    Audiomonk on #16196

    I don’t get why it’s showing the old for you, but when I looked at it, it was correct.

    I just checked there, and the one in the child theme is renamed, so I don’t know why it’s placing the incorrect code there still?

    I’ll rename it back and add the code above into it.

    https://pasteboard.co/HtorTtE.png

    This is from the inspection window after doing the above,

  • Participant
    Level: Master
    Posts: 163
    Audiomonk on #16197

    I’ll work out why it isn’t updating with the changes, some sort of caching thing going on.

  • Participant
    Level: Master
    Posts: 163
    Audiomonk on #16198
    <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.

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #16199

    Hi Audiomonk,
    I am not sure why but something is messing up with your site. Try disabling the child theme and using some other theme to check.

    Like I suggested above, there is no better solution than that for this case/

    Also, It does not matter which css file you are updating. It has nothing to do with MediaPress. It is a conflict with some code in your theme or another plguin.

    For me, It is very strange why the updates are not working. Is there OPCache or APC enabled on your server? They might cause it and need flushing.

  • Participant
    Level: Master
    Posts: 163
    Audiomonk on #16200
    .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.

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #16201

    That code is vital to accessibility on your site and if you comment it out, It will make many things visible which should not be.

    BuddyPress uses that class to hide elements on normal screen and use for accessibility.

  • Participant
    Level: Master
    Posts: 163
    Audiomonk on #16205

    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
    Audiomonk on #16206

    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.

The topic ‘ [Resolved] Browse profile pic and crop fixed and broken!’ is closed to new replies.

This topic is: resolved