Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 19 replies - 1 through 19 (of 19 total)

  • gingerbooch
    Participant

    @gingerbooch

    @imath, then that was implemented between 10.3 and 11.4 πŸ˜‰ I will read more about this new Block Themes feature, thanks for the hint.
    Can I ask you (around) when version 12.0 will be live on WordPress ? No hurry, just for information.


    gingerbooch
    Participant

    @gingerbooch

    Hi @africanfoods,

    I am actually updating to official 11.4.0 version and I faced the same problem.

    This one is quite tricky. I had to dig into rebuilding my child theme from scratch in order to understand what was going wrong.

    I found that Buddypress now uses the content of a potential “templates” folder, directly in the root of your theme directory (previously it was only looking for a buddypress folder in the theme directory).

    You may have created a folder you named like that in your theme or child theme folder, which was not related to Buddypress. As buddypress now read this folder, be careful with the content. Especially if there is an empty “index.html” file in that folder.

    If you find one, just be sure that file was put here for basic security purpose, not for a specific use, then you can delete it, or rename like “index.html_backup”. Once you remove or rename this file, you should get your users’ profile pages back.

    I don’t know the use or reason for this new feature, maybe @imath can tell us more.


    gingerbooch
    Participant

    @gingerbooch

    Hi @jolom,

    Did you find an answer to this request ?

    I’m thinking of making this feature for my use if it does not exist.

    Please tell me if you found an existing one or if you are interested in.

    GB


    gingerbooch
    Participant

    @gingerbooch

    Mistake.
    You can delete this thread.


    gingerbooch
    Participant

    @gingerbooch


    gingerbooch
    Participant

    @gingerbooch

    Ok I just copied my last reply to the previously opened ticket.


    gingerbooch
    Participant

    @gingerbooch

    Hi @Venutius,

    I finally found some time to make more tests on this issue.

    What I did :

    Install a fresh WordPress 5.1.1 on a test server.
    Install Buddypress 4.3.0.
    Create a user called “blue”.
    Create a user called “red”.
    Connect with “blue” and send a private message to “red” saying “Hello I am blue and I say blue”.
    Connect with “red” and send a private message to “blue” saying “Hello I am red and I say red”.
    Export Data for both “blue” and “red” users.

    Result :
    Export Data for user “blue” shows one message sent to recipient “red” with content : “Hello I am blue and I say blue”.
    Export Data for user “red” shows one message sent to recipient “blue” with content : “Hello I am blue and I say blue”.

    The result is the same on this fresh install. For both users in a thread, the Export Data only returns the private message data content wrote by the creator of the thread.

    For your information, I am running WordPress with French language. However I don’t think this can be linked to my issue.

    Can you try to reproduce this please ?
    I still think it is a bug.

    Thank you πŸ™‚


    gingerbooch
    Participant

    @gingerbooch

    The final code is :

    function custom_is_user_change_cover_image() {
    	global $bp;
    	return (bool) ( bp_is_settings_component() && bp_is_current_action( 'change-cover-image' ) );
    }
    
    function custom_bp_core_cover_image_scripts() {
    	global $bp;
    	if (! custom_is_user_change_cover_image()) {
    	return;
    	}
    	// Enqueue the Attachments scripts for the Cover Image UI.
    	bp_attachments_enqueue_scripts( 'BP_Attachment_Cover_Image' );
    }
    add_action( 'bp_enqueue_scripts', 'custom_bp_core_cover_image_scripts' );

    gingerbooch
    Participant

    @gingerbooch

    Oh I can post code again !! Champagne !!


    gingerbooch
    Participant

    @gingerbooch

    Hi @venutius,

    Thanks A LOT for your help !!! Your filter is awesome !!! πŸ˜€ πŸ˜€

    – First I tried to copy/paste your code in mine, that made the change-cover-image feature fully working.

    – Then I removed the function and filter (wich I didn’t correctly used anyway lol …) : add_filter( 'bp_attachments_cover_image_is_edit', 'custom_attachments_cover_image_is_edit', 10, 2); and it was still working.

    – Then I saw change-avatar was not working anymore. I changed your condition to this one : if (! custom_is_user_change_cover_image() and the change-avatar is back.

    – Finally I tried to remove the function and filter : add_filter( 'bp_avatar_is_front_edit', 'custom_avatar_is_front_edit', 10, 1); and to reproduce your filter with BP_Attachment_Avatar but that did not work. There is a different filter for each one.

    I am a bit curious about this last point. Can you explain me why it is different please ?

    Thanks again I’m very grateful !! πŸ˜€


    gingerbooch
    Participant

    @gingerbooch

    I can’t post my code here, first time it happens.

    Please check here : https://www.codepile.net/pile/Vy7L3YD2

    I think I miss something with bp-attachments, maybe related to xprofile / current component.


    gingerbooch
    Participant

    @gingerbooch

    Hi @venutius,

    Thank you for your interest. I found a solution to get the avatar drag & drop to work from the change-avatar page moved to settings.

    I tried to apply the same logic for change-cover-image but it seems I need something more. At the moment the template loads well but there is no drag & drop neither any upload form.

    I want to post my code but I get this error : ERROR: Your reply cannot be created at this time.


    gingerbooch
    Participant

    @gingerbooch

    Hi, did you find a solution please ?


    gingerbooch
    Participant

    @gingerbooch

    Hi @iamdev,

    You can put that code into your theme/functions.php :

    function change_export_plugins_names( $export , $name ) {
     $name = str_replace( 
    			Array( 	'Value_1_before',
    				'Value_2_before',
    				'Value_3_before'	),
    			Array( 	'Value_1_after',
    				'Value_2_after',
    				'Value_3_after'	),
    			$export );
        return $name;
    }
    add_filter( 'bp_settings_data_exporter_name', 'change_export_plugins_names', 10, 2);

    If Value_#_before contains accents, replace : $export with utf8_decode($export).

    This works for me.


    gingerbooch
    Participant

    @gingerbooch

    I only deactivated my BP Message plugin for the tests.
    I will reproduce it again with no other plugin activated.
    Thank you for your help.


    gingerbooch
    Participant

    @gingerbooch

    Thanks for your answer,

    I opened a bug ticket.


    gingerbooch
    Participant

    @gingerbooch

    Hi @prashantvatsh,

    At first, I thought your test was different because the default avatar in you example is a static one called “Logo (Gravatar)”, the same for every users, while mine is a dynamic one called “Identicon (generated)”, a different one for every users.

    I tried your example on a test server, that worked. Then I tried with my case (generated identicon), that worked too !

    Finally I found the reason, in fact the replacement avatar was not coming from the classic “upload a picture”, it was coming from a social plugin (nextend) which retrieves the facebook avatar when you link your WP-account with FB-account, and stores it in the server but in a different folder that buddypress does. (Plus some extra “butterflies” in the DB …)

    I reproduced it several times today to understand exactly what is happening, I write it down in case that could help anyone in the future.

    What I did first was unlinking the FB-account, but I realized the avatar was still there.
    So I clicked on “delete the picture” from my BP-profile page. Success message, but the FB-avatar is still there.
    Then I use “inspect element” on my browser. I found his name is “user-99-2-150×150.jpg” and I get the path to the folder too.
    First I search that file in the database, I found one “_wp_attachment_metadata” in “postmeta” table. I delete the row.

    Here is the point I was stuck on. The picture is gone but there is no more avatar and the header is now above the profile tabs πŸ™
    Then I went to the server folders, removed the file but what I missed last time is that there are two files πŸ™„ … “user-99-2-150×150.jpg” & “user-99-2.jpg” … I deleted both, no changes, and I did it so fast, I forgot there was 2.

    I really thought the problem was coming from BP/Gravatar.com, I thought the path to my original avatar was lost in the DB (and using a dynamic name).
    Finally, thanks to your answer, I just inspected the header again, and found the new avatar link pointing to the second file “user-99-2.jpg” !! Yes !! πŸ™„

    Back to the database to look for this second file and there are two answers :
    One “_wp_attachment_metadata” row in “postmeta” table -> deleted. (at this stage the original gravatar is back)
    One “attachment” row in “posts” table -> deleted. (no need to keep this row)

    The problem is solved. Thanks a lot for your answer, you drove me to the good direction.
    Have a nice day πŸ™‚


    gingerbooch
    Participant

    @gingerbooch

    Hi @prashantvatsh,

    Thanks for your help. I red that link but it seems my problem is different.
    Actually what I want is my user’s gravatar identicon to be restored after the user deletes his custom avatar.
    When my users register, they automatically get an identicon from gravatar (each one is different). When they change this to a custom avatar, and then delete it, their gravatar is not getting back.
    Instead they get no avatar and their cover-image falls above their profile’s navigation links.

    I’m using Heritage default BP theme.


    gingerbooch
    Participant

    @gingerbooch

    Hi @scharfh,

    How did you resolved your problem please ?
    I am using Transposh, and for some reason with my config I don’t want to use the mode with reference at the end of URL. I must use it with URL rewriting, and I got the same issue you experienced with Translatepress and the members’ pages not reachable.
    Did you find a way to make the “language subdirectory” working for members pages with Translatepress or with Transposh ?

    Thank you

Viewing 19 replies - 1 through 19 (of 19 total)
Skip to toolbar