Salih K
Forum Replies Created
-
Forum: Plugins
In reply to: [Breeze - WordPress Cache Plugin] Getting Failed to load resource error@adeelkhan I know it is late, but the issue still stays.
The issue in short is after a particular time website crashing(with in 24hrs), in the console I can see the breeze minified css and js files are showing 404, and if I check the server, in uploads breeze folder, I dont see the files generated. I can share these details and access to the website. But as I said I am not using Cloudways, I am using Google Cloud Server, with Breeze and Cloudflare.
Interesting this is, if I do a hard refresh of the broken page, from anywhere(even though I am not logged in) the missing CSS&JS files are getting generated and fixing the issue.
Additionally, is there any conflict with Cloudflare APO(Automatic Platform Optimization).
Do I need Cloudways account to get support? is there any other ways to get the support?
@danooh thank you so much, that worked. Do you see any option that we can add to make a radio button selected by default(I mean adding the ‘checked’ attribute).
@kimwhite Thank you so much.
To make my scenario more clearer, let me give you an example:
In a form I have radio buttons to select ‘Single’ and ‘Couple'(field labelled as Status), If ‘single’ is selected ‘First Name’ and ‘Last Name’ will be shown, and if ‘Couple’ is selected need to show ‘First Name’, ‘Last Name’, ‘Spouse First Name’ and ‘Spouse Last Name'(here First Name and Last Name is common to both status)
In this scenario how can I give condition to First Name and Last Name. If I use below like code it wont work. It check both conditions for true, right? In another words I think not AND but need OR condition.
‘depends’ => array( array( ‘id’ => ‘status’, ‘value’ => ‘Single’ ), array( ‘id’ => ‘Status’, ‘value’ => ‘Couple’ ), )
Also one related question, Is there a way that we can make a radio button selected by default when field is created through User fields section?
@artidestudio I am not sure you have tried this documentation, this will work. Please check the sample code you have at the bottom of the page.
$fields[] = new PMPro_Field(
‘how_hear_referrer’,
‘text’,
array(
‘label’ => ‘Referred by’,
‘profile’ => ‘admins’,
‘memberslistcsv’ => true,
‘depends’ => array(array(‘id’ => ‘how_hear’, ‘value’ => ‘Other’))
)
);Note the “depends” section.
- This reply was modified 1 year, 8 months ago by Salih K.
Forum: Plugins
In reply to: [Breeze - WordPress Cache Plugin] Getting Failed to load resource error@adeelkhan thank you for your reply.
As I told you, I am using Breeze and Cloudflare, I have already tested all the testing steps. I only have these two plugins active. So these are my doubts:
If I Purge the Cache either from Breeze or Cloudflare the issue will be fixed, So is there any settings or any adjustments I have to do when using with Cloudflare? Is this related to “Purge Cache After” settings of Breeze and Cloudflare cache conflict? Or any thing related to file permissions?
Another thing, Can I disable the Breeze caching and use all other features, When I disable caching I see the Minification/Combining features not working. am I missing any thing in this section or is it like this?
@davethedon No
I am also facing the same issue. We are uisng Gravityforms. I have been trying to integrate this in our forms, and noticed this error last day. Once you submit the form with out the errors, ie there are no field validation errors, then you wont see any issues, but if you have any field validation error then you will see the widget disappears and have this error in console “(index):6 Uncaught ReferenceError: turnstile is not defined“. thus it wont allow you to submit the form again.
I have been tryin with all three widget options “Managed, Non-interactive and Invisible”, but all have this issue. It happens even on a fresh WP install.
Forum: Fixing WordPress
In reply to: Google Indexing issue with rest api url@auuurimas For now I have already added Robot.txt to disallow the /wp-json/, and I have checked the sitemap and I don’t see these URLs on that. I still wonder how these URLs getting indexed, I never see this before.
@zeetheme
Brother, this is not the Swiper Undefined issue, seems Swiper is successfully instantiated, check by changing the below line://here you define your swiperElement, swiperConfig swiperElement = ('.slider-ex.swiper-container');
By
//here you define your swiperElement, swiperConfig swiperElement = $('.slider-ex.swiper-container');
- This reply was modified 2 years, 10 months ago by Salih K.
I am sorry, I could not figure out what you are up to, the main thread of this discussion was about Swiper undefined issue happening on your custom widget, ie widget is created by you, so you can easily fix the said issue by loading the Swiper in the new preferred way as Elementor suggests.
Here I think you are using a third party plugin, and you want to fix the issue. If that is the case I dont think that will be possible, or you may have work a little hard, otherwise you may have to contact the plugin author.
Yet, a few points:
in the code you provided, the swiperInstance should be the Swiper container class name, like below:
swiperInstance = ('.home-slider.swiper-container')
Other thing, for me, I was able to do a quick fix by just disabling the Improved Asset Loading feature, for this you can check Elementor > Settings > Experiments > Improved Asset Loading – make this inactive, by the latest update this experiment by default is active, By making this inactive Swiper will be available globally all time.
- This reply was modified 2 years, 10 months ago by Salih K.
@ivanverona1 you are doing it wrong again. please check the Elementor developer documentation, here is how you register the widget handler – https://developers.elementor.com/building-a-simple-custom-widget-with-javascript/
see the section: Registering the Widget Handler with Elementor
you can try try this way:jQuery( window ).on( 'elementor/frontend/init', () => { const addHandler = ( $element ) => { //here you define your swiperElement, swiperConfig //then use the code if ( 'undefined' === typeof Swiper ) { const asyncSwiper = elementorFrontend.utils.swiper; new asyncSwiper( swiperElement, swiperConfig ).then( ( newSwiperInstance ) => { console.log( 'New Swiper instance is ready: ', newSwiperInstance ); mySwiper = newSwiperInstance; } ); } else { console.log( 'Swiper global variable is ready, create a new instance: ', Swiper ); mySwiper = new Swiper( swiperElement, swiperConfig ); } }; elementorFrontend.hooks.addAction( 'frontend/element_ready/content-toggle-button.default', addHandler ); } );
@ivanverona1 first you should not change this
if ( 'undefined' === typeof Swiper ) {
and the code should be inside
elementorFrontend.hooks.addAction
callbackMe too facing the same issue after new update, If I disable Improved Asset Loading(Settings > Experiments) works fine. It looks like we need to load the Swiper JS, when I check the core I can confirm Elementor now checking for this, like this(here elementor/includes/frontend.php):
if ( ! $this->is_improved_assets_loading() ) { wp_register_script( 'swiper', $this->get_js_assets_url( 'swiper', 'assets/lib/swiper/' ), [], '5.3.6', true ); ....... }
So I have tried get_script_depends() like below:
public function get_script_depends() { return [ 'swiper', 'slider-script' ]; }
not working,
also tried adding ‘swiper’ as a dependency when we register the custom javascript file , but then the javascript file doesn’t even load.
array( 'jquery', 'elementor-frontend', 'swiper' )
@ozyeger Any advice