stevemullen
Forum Replies Created
-
This code is happening from a wp-cron event, which I don’t think I explained well enough.
So how do I upload a photo to a post as part of such a request, with no user? As I said – this code has worked for years, and recently (probably with WP 6) has stopped working.
Thank you
Does that response make sense? There is no sending app. It’s php code running in the theme.
$request = new WP_Http();
$photo = $request->request( ‘https://realestatedigital.propertiescdn.com/ListingImages/camrmls/images/1200/0/22199001.jpg’ );if (is_a($photo, ‘WP_Error’))
{
self::log(__FILE__, __FUNCTION__, __LINE__, ‘WP_Http request returned an error: ‘.print_r($photo, true));
}
else
{
if( $photo[‘response’][‘code’] == 200 )
{
$attachment = wp_upload_bits( ‘image_0.jpg’, null, $photo[‘body’], date(“Y-m”, strtotime( $photo[‘headers’][‘last-modified’] ) ) );
if( empty( $attachment[‘error’] ) )
{
// Handle the uploaded file
}
else
{
// Handle the error
}
}
else
{
self::log(__FILE__, __FUNCTION__, __LINE__, ‘WP_Http request returned error: ‘.$photo[‘response’][‘code’]);
}
}Hi
I gave an example file – https://realestatedigital.propertiescdn.com/ListingImages/camrmls/images/1200/0/22199001.jpg. It is named correctly as “.jpg”, and when opening that file in a browser, the content headers show “content-type: image/jpeg”.
This is happening programmatically – no user is involved.
This code has worked for years, and recently stopped working. I’m thinking some security change to WP 6 is involved.
Thank you
SteveI’ve moved the code to the
init
event:if (defined('TRP_PLUGIN_DIR')) { if ($page_should_load_real_estate_listing) { add_action('trp_before_running_hooks', function($trp_loader) { $trp_loader->remove_hook( 'init', 'create_gettext_translated_global' ); $trp_loader->remove_hook( 'shutdown', 'machine_translate_gettext' ); }, 10, 2); } }
Unfortunately, the problem is still happening.
Thank you for responding.
I tried the page https://elcentrousa.com/id/middleton/8376-mack-attack in incognito, and still observed the problem.
I suspect this is a timing issue. I’m trying to unhook the TranslatePress
trp_before_running_hooks
in myplugins_loaded
event. Is that too late in the loop?Forum: Plugins
In reply to: [Contact Form 7] New block-editor.php code errors with 404This is an important issue. Please respond – thank you.
Forum: Plugins
In reply to: [Yoast SEO] How to stop all output tags for a specific custom post type onlyI agree with @gigateil. The behavior of
add_filter( 'wpseo_title', '__return_false' );
is inconsistent with other Yoast filters using ‘__return_false’.Using ‘__return_false’, the <title> should not be output by Yoast at all. That would be consistent with other hooks like
add_filter( 'wpseo_metadesc', '__return_false' );
Using
'wpseo_title'
with a callback to modify the title is fine, but'__return_false'
should absolutely suppress it.Forum: Plugins
In reply to: [Crelly Slider] TypeError: Cannot read property ‘indexOf’ of undefinedI believe this was a selector issue – resolved.
- This reply was modified 3 years, 10 months ago by stevemullen.
It’s working – thank you !
Forum: Plugins
In reply to: [Rover IDX] Styles are broken for mobile devicesHi Antonio,
Sorry – what was the issue?
Thank you
Steve MullenHi Dario,
Thanks for all your help so far – your support really is top notch!
I checked all three videos, and each is exactly 8.0 seconds. I had cleared the Cloudflare cache before opening this ticket. I’ve since made sure to add “8sec” to the filename of each mp4, and also cleared the cache.
I did change the “Effect Duration” (I think this is the slide-specific setting you were referring to) to 1000 ms, and also changed the “Delay between transitions” to 7500 ms.
Could you please check again? I am loading these three 8 second files, with the settings changes, and still seeing the hiccup.
PS – I look forward to the ‘start from beginning on loop’ feature!
Thank you
SteveForum: Plugins
In reply to: [Transition Slider - Responsive Image Slider and Gallery] b is not a functionYou are right – Cloudflare was serving up the old files.
Thank you – it’s fixed.
Forum: Plugins
In reply to: [Transition Slider - Responsive Image Slider and Gallery] b is not a functionHi
2.12.1 is the update, right? If so – I’m sorry, the problem is not solved.
Thank you
Forum: Plugins
In reply to: [Transition Slider - Responsive Image Slider and Gallery] b is not a functionInteresting.
I am the author of https://www.ads-software.com/plugins/rover-idx/, which is the only other plugin running on the site. Both Rover IDX and Transition Slider Lite are using the Swipe library. I naturally suspected a conflict. I’ve removed the Rover IDX content from the page (therefore our Swipe js does not load) – but I still see the error.
So then I deactivated Rover IDX. And the slider worked without error.
The page definitely was not loading the Slider js. But there is obviously a conflict. Your js is minified. Is there a way I can load unminified js to get a better handle on what is happening?
Thank you