Home › Forums › Legacy Support › Support queries › Other issues › Viewing attachments in units
- This topic has 14 replies, 3 voices, and was last updated 3 years, 10 months ago by Veronica.
Viewing 15 posts - 1 through 15 (of 15 total)
-
AuthorPosts
-
May 27, 2020 at 6:18 pm #263407Nibu2019ParticipantHello, When you insert an attachment in a chapter, it sometimes appears in text, sometimes in image. How can we adjust this parameter? This example with 3 files : 1 docx and 2 pdf. PDF_link ThanksMay 27, 2020 at 7:00 pm #263415Nibu2019ParticipantI tried to deactivate the plugins one by one but nothing changes!May 28, 2020 at 12:49 pm #263734VeronicaModeratorhi, wired!! i have never faced this type of error are you using any cache plugin if yes then try to disable this and then check if the same persistMay 31, 2020 at 4:32 pm #264519Nibu2019ParticipantI'm sorry, but I'm not the only one. The teachers insist that I find a solution. What can I do ?. This topic I tried to add the code as explained in the topic, but it doesn't work. I disabled plugins one by one as recommended in the topic, but nothing changes Can you transfer my problem to Alex who has already worked on this problem?May 31, 2020 at 9:46 pm #264538Nibu2019ParticipantWhen I insert an April PDF from the media, I don't have this problem.May 31, 2020 at 11:05 pm #264542Nibu2019ParticipantThe problem comes in my opinion from a plugin that I had installed: PDF Embedder Premium When you upload a pdf, it automatically creates image files in 4 copies of different formats. I uninstalled it but the files keep creating automatically. I just uploaded a jpeg file. When I go to the uploads directory, I find 10 copies of this file in different formats. Has my wplms been hacked? What can I do to stop this?June 1, 2020 at 1:44 pm #264809Nibu2019ParticipantI contacted the PDF Embedder plugin support, but the problem does not come from there. I hope we can find a solution to this problem ;-)June 1, 2020 at 1:49 pm #264816Anshuman SahuKeymasterPlease share your site url , admin credentials in private reply to check this .June 1, 2020 at 1:55 pm #264824Nibu2019ParticipantThis reply has been marked as private.June 2, 2020 at 12:35 pm #265117Anshuman SahuKeymasterWell we are using a wordpress function " wp_get_attachment_link " in which the either the wordpress itself or some third party plugin is showing review . Please try adding this custom css in your wp-admin -> appearance -> customize -> custom css in order to hide the thumbnail : ul#attachments i.fa.fa-file-pdf-o+a img {display:none;}June 2, 2020 at 1:16 pm #265147Nibu2019ParticipantHello, The code did not work. Sorry! I'm going to make a little video : Pdf_after_march_problem The problem only manifests itself for pdf uploaded from May. If we take a pdf from a previous month, the problem does not arise. If it was a plugin problem, it shouldn't do it every time. Finally, we can see that some pdf files from May appear with a black band in the media. I saw that this problem was part of the upcoming fixes for version 4.0 Have a nice day ;-)June 2, 2020 at 2:40 pm #265183Nibu2019ParticipantI just deleted the other codes from my CMS leaving only yours and this time, I no longer have the image but I also do not see the name of the pdf. Pdf_title_no_show Half the problem is solved ;-)June 3, 2020 at 1:15 pm #265506Anshuman SahuKeymasterPlease try adding this given code in your wplms-customizer.php file in wplms customizer plugin : add_action('wplms_before_every_unit',function(){ add_filter('wp_get_attachment_link',function($link,$id,$size,$permalink,$icon,$text,$attr){ $_post = get_post( $id ); if ( empty( $_post ) || ( 'attachment' !== $_post->post_type ) || ! wp_get_attachment_url( $_post->ID ) ) { return __( 'Missing Attachment' ); } $url = wp_get_attachment_url( $_post->ID ); if ( $permalink ) { $url = get_attachment_link( $_post->ID ); } $link_text = $_post->post_title; if ( '' === trim( $link_text ) ) { $link_text = esc_html( pathinfo( get_attached_file( $_post->ID ), PATHINFO_FILENAME ) ); } return "<a href='" . esc_url( $url ) . "'>$link_text</a>"; },999999,7); });June 3, 2020 at 2:30 pm #265541Nibu2019ParticipantIt's perfect. Thank you very much. You can close this topic ;-) Good evening !June 5, 2020 at 10:57 am #266054VeronicaModeratorthanks to confirm topic closed #staysafe
-
AuthorPosts
Viewing 15 posts - 1 through 15 (of 15 total)
- The topic ‘Viewing attachments in units’ is closed to new replies.