Pacicio
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: wp_mail do not send attachments with PHPMailerThe IDs send by the form I’m sure that are the IDs the attachment of a post because the form is part of the plugin, but I should add some checks on the PHP code, that’s for sure. Anyway, this is an internal plugin that we do not plan to make public.
However, on another website with the same hosting configuration everything works fine. I think is probably related to the hosting configuration or the website itself. I’m pretty sure is nothing coding related so I mark this as resolved.
Thanks for the advice!
Forum: Developing with WordPress
In reply to: wp_mail do not send attachments with PHPMailerYes, I’m coding this myself and this is my code: it sends the email after a form is compiled, using AJAX.
add_action( 'wp_ajax_dm_send_email', 'dm_send_email' ); function dm_send_email() { $email = $_POST['email']; $subject = $_POST['subject']; $headers = explode( ',', $_POST['headers'] ); $body = $_POST['body']; $attachments_ids = explode( ',', $_POST['attachments'] ); foreach ( $attachments_ids as $attachment_id ) { $attachments[] = get_attached_file( $attachment_id ); } $headers[] = 'Bcc: ' . wp_get_current_user()->user_email; $content_type = function() { return 'text/html'; }; add_filter( 'wp_mail_content_type', $content_type ); $email_sent = wp_mail( $email, $subject, stripslashes($body), $headers, $attachments ); remove_filter( 'wp_mail_content_type', $content_type ); echo $email_sent; exit(); }
It should be fine because in the old hosting it was working. However any advice is greatly appreciated.
Forum: Plugins
In reply to: [Create Block Theme] Version management for exported themes@thelmachido don’t need to, she already mentioned the changelog in the GitHub report, I was referring to that.
Forum: Plugins
In reply to: [Create Block Theme] Version management for exported themesThank you, I wanted to do it myself but I don’t know how to use Github properly. Also the changelog, even if simple text only, would be a great addition.
Forum: Fixing WordPress
In reply to: 6.0.2 Causing Google Crawl Error for admin.ajax.php@kuhnbnubstahl I have the same problem and I have Hello Elementor too (version 2.6.1). May it be a theme related issue?
Wordpress version is 6.0.2 and the only plugins we share are Disable Emojis, Elementor, Elementor Pro and Matomo.
Forum: Fixing WordPress
In reply to: AnonymousFox hack on staging website with almost no plugins. How?It may well be that your site has been hacked for a long time ago
This is unlikely. The website is a fresh installation made less than one month ago and we installed nothing but the plugins listed.
This is what scares me most. A fresh installation with trusted plugins that got hacked. Past hacks always involved some bugged plugin or something else, but this time it feels so strange.
I would like to understand where the possible exploit could be to prevent those things in the future.
We enabled some server-side security improvements, but we usually do these on published websites because we don’t expect hack on development websites. Evidently we were wrong.
Forum: Fixing WordPress
In reply to: Print post from admin with custom templateGood idea, I’m going to try. I only hope that 20+ fields in a URL don’t break everything
Forum: Fixing WordPress
In reply to: Clarification on media assigned to postNevermind, solved.
Forum: Plugins
In reply to: [Yoast SEO] Meta Box preview not showing (JS error) in WooCommerce productI’ve created the issue on GitHub: https://github.com/Yoast/wordpress-seo/issues/12008
I mark this as resolved. For other users who want to comment, just follow the link.
Forum: Plugins
In reply to: [Yoast SEO] SEO Title and desc preview WooCommerce productI’ve had a similar problem time ago. I solved by reducing the number of columns displayed in the page: click on “Screen options” in the top right corner of the page to select which columns to show or hide.
Forum: Fixing WordPress
In reply to: WordPress 4.6 has caused significant issues.I’m not an expert of server configuration, so I can’t help any more. Sorry!
Forum: Fixing WordPress
In reply to: Can pictures actually slow down your website?Pictures can slow down a website , as said above.
You should resize your images with GIMP o Photoshop, before uploading.
I usually scale the images to the exact size I need them, with a quality of 60-70, progressive.
Forum: Fixing WordPress
In reply to: WordPress 4.6 has caused significant issues.The “.htaccess” file is in the root of your site: you can access and modify it using an FTP Client or the File Manager of your hosting service.
The code I posted before should fix the issue.
Forum: Fixing WordPress
In reply to: WordPress 4.6 has caused significant issues.I found the solution (at least, for me)!
It was an Expire Headers issue. The Nginx directive was bad.
This is the old directive:
expires 24d;
and this is the new one:
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ { expires 24d; }
which tells the browser to cache only the files with the specified extensions.
If you are using only Apache, without Nginx, adding the following line to your “.htaccess” file should solve the issue, but I didn’t test it:
#Expire Header <FilesMatch "\.(ico|jpg|jpeg|png|gif|js|css)$"> ExpiresDefault "access plus 24 days" </FilesMatch>
If the website is not showing, just remove the lines.
Hope it helps!
Forum: Fixing WordPress
In reply to: WordPress 4.6 has caused significant issues.Similar problem for me.
In various sites, I need to refresh the page to see the changes made. Even in development sites which don’t have any caching plugin.
Running on PHP 7.0.9, ?CentOS 6.6.