Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter seds94

    (@seds94)

    Hello,
    So sorry, what was I thinking? the title doesn’t emit error, image field does, when I add youtube video with url, and even when i set image from gallery not depending on .htaccess

    I don’t understand. I just tried several times, changing .htaccess. In my last message I probably had better luck. The error is actually random. About 9/10, the image generates this error, with the youtube url or from the gallery

    • This reply was modified 2 years ago by seds94.
    seds94

    (@seds94)

    Hi @simoneideagency

    You should update to Version 4.0.8, they remove this requirement.

    But if you don’t:
    – find js to override by searching woo-refund-and-exchange-lite-common in inspector, it should be /woo-refund-and-exchange-lite/common/js/woo-refund-and-exchange-lite-common.min.js
    – copy code, unminify it and paste in a js file, inside a template child (or a custom plugin)
    – in you new js, near l.121 just comment :
    else o = '<p class="wps_order_msg_sent_notice">' + wrael_common_param.no_file_attached + '</p><a href="" class="wps_remove_notice_msg">X</a>';

    then replace plugin js by your new js. Personnally, I custom messaging order page with a template, and it’s easier to find and override js

    What I done from Version 4.0.5:

    
    if ( is_plugin_active( 'woo-refund-and-exchange-lite/woocommerce-refund-and-exchange-lite.php') ) {
            // dequeue js plugin (and its extra):
            add_action( 'wp_enqueue_scripts', 'rma_common_remove_js', 100);
            function rma_common_remove_js() {
                if ( is_page_template('template-rma.php') ) {
                    wp_dequeue_script( 'Return Refund and Exchange for WooCommercecommon' );
                }
            }
            // enqueue your new script and its extra:
            add_action( 'wp_enqueue_scripts', 'rma_common_override_js' );
            function rma_common_override_js() {
                if ( is_page_template('template-rma.php') ) {
                    wp_enqueue_script('child-rma-common', CHILD_TMPL . '/assets/js/your-new-file-name.js', array('jquery'), '', true);
    
                    $pro_active = wps_rma_pro_active();
                    if ( get_current_user_id() > 0 ) {
                            $myaccount_page     = get_option( 'woocommerce_myaccount_page_id' );
                            $myaccount_page_url = get_permalink( $myaccount_page );
                    } else {
                            $myaccount_page     = get_option( 'woocommerce_myaccount_page_id' );
                            $myaccount_page_url = get_permalink( $myaccount_page );
                    }
                    wp_localize_script(
                            'child-rma-common',
                            'wrael_common_param',
                            array(
                                'ajaxurl' => admin_url('admin-ajax.php'),
                                'wps_rma_nonce' => wp_create_nonce('wps_rma_ajax_security'),
                                'return_subject_msg' => esc_html__('Please Enter Refund Subject.', 'woo-refund-and-exchange-lite'),
                                'return_reason_msg' => esc_html__('Please Enter Refund Reason.', 'woo-refund-and-exchange-lite'),
                                'return_select_product' => esc_html__('Please Select Product to refund.', 'woo-refund-and-exchange-lite'),
                                'check_pro_active' => esc_html($pro_active),
                                'message_sent' => esc_html__('The message has been sent successfully', 'woo-refund-and-exchange-lite'),
                                'message_empty' => esc_html__('Please Enter a Message.', 'woo-refund-and-exchange-lite'),
                                'myaccount_url' => esc_attr($myaccount_page_url),
                                'refund_form_attachment' => get_option('wps_rma_refund_attachment'),
                                'order_msg_attachment' => get_option('wps_rma_general_enable_om_attachment'),
                                'no_file_attached' => esc_html__('No File Attached', 'woo-refund-and-exchange-lite'),
                                'file_not_supported' => esc_html__('Attached File type is not supported', 'woo-refund-and-exchange-lite'),
                            )
                    );
                }
            }
    }

    Depending on your version, you have to pay attention to the handle name (ID of the script) to dequeue. You should find it when you found plugin js in inspector.

    When I updated plugin to Version 4.0.8, they seems to consider my recommendations, and ID of the script is not “Return Refund and Exchange for WooCommercecommon” anymore but “return-refund-and-exchange-for-woocommercecommon-js”, so you must dequeue it this way: wp_dequeue_script( 'return-refund-and-exchange-for-woocommercecommon' );
    In this version 4.0.8, they removed the line previously commented in your js overriden. So you don’t have to override it.

    I don’t know when they finally decided to change handle name (ID script) and remove requirement. You should be care.

    And last advice:
    To avoid problems with the html code, you should correct woo-refund-and-exchange-lite\public\partials\wps-rma-view-order-msg.php l.55:

    
    				<div class="wps-order-msg-btn">
    					</div>
    						<input type="submit" id="wps_order_msg_submit" name="wps_order_msg_submit" value="<?php esc_html_e( 'Send', 'woo-refund-and-exchange-lite' ); ?>" data-id="<?php echo esc_attr( $order_id ); ?>">
    						<input 	type="hidden" name="wps_order_msg_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wps_order_msg_nonce' ) ); ?>"> 
    					</div>
    				</div>
    

    replace with

    
    				<div class="wps-order-msg-btn">
    					<div>
    						<input type="submit" id="wps_order_msg_submit" name="wps_order_msg_submit" value="<?php esc_html_e( 'Send', 'woo-refund-and-exchange-lite' ); ?>" data-id="<?php echo esc_attr( $order_id ); ?>">
    						<input 	type="hidden" name="wps_order_msg_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wps_order_msg_nonce' ) ); ?>"> 
    					</div>
    				</div>
    

    I couldn’t do anything else but correct it inside the plugin, you’ll have to check it after each update. I also reported this carelessness, but it still hasn’t been corrected.

    • This reply was modified 2 years ago by seds94.
    • This reply was modified 2 years ago by seds94.
    • This reply was modified 2 years ago by seds94.
    • This reply was modified 2 years ago by seds94.
    Thread Starter seds94

    (@seds94)

    Hello, I don’t understand, today there is no more problem, maybe because I changed the .htaccess file earlier.
    Could this have an impact when the error message talks about database access?

    Thread Starter seds94

    (@seds94)

    Hi we use Polylang, and I reproduce the problem on product list too sorry..

    • This reply was modified 2 years, 3 months ago by seds94.
    Thread Starter seds94

    (@seds94)

    I just checked in detail
    indeed, in the list of product liste, no problem any more
    but in the list of pages, in the case of a multilingual site, if only one language is displayed, only the current line is impacted, if all the languages are displayed, the translations also lose the order of their columns

    Thread Starter seds94

    (@seds94)

    Yes sorry, the problem is different, it was late and I didn’t read the entire post and went straight to the solution

    the problem is that reloading the row after submit breaks the column order from the current row to the end of the table. No js error.

    • This reply was modified 2 years, 3 months ago by seds94.

    Finally I dequeue the script and override it to remove requirement, easy..

    Hi,
    Yes please make attach file requirement optional, because order messaging does not absolutely need an attachment
    Regards

    Thread Starter seds94

    (@seds94)

    Hi, thanx for your feedback.

    Done by copying WPMM $default_options and running ajax :

    if ( is_plugin_active( 'wp-maintenance-mode/wp-maintenance-mode.php') ) {
    
        /**
         * Status auto-update at the end of downcount
         */
        // Check status
        function isWpmmActive( $countdown = null ) {
            $setting = get_option( 'wpmm_settings' );
            // Active mode
            if ( 1 === $setting['general']['status'] ) {
                if ( $countdown ) {
                    // Countdown active
                    if ( 1 === $setting['modules'] ['countdown_status'] ) return true;
                    return false;
                }
                return true;
            }
            return false;
        }
        
        if ( isWpmmActive() )
        {
            // No enqueue from WPMM, use wpmm_styles to load default CSS
            add_filter( 'wpmm_styles', 'wpmm_moem_styles' );
            function wpmm_moem_styles( $styles ) {
                $styles['wpmm-moem'] = CHILD_TMPL. '/assets/css/wpmm.css';
                return $styles;
            }
        }
        
        if ( isWpmmActive( 'countdown' ) )
        {
            // Reset WP maintenance mode on ajax call
            add_action( 'wp_ajax_meom_disable_maintenance_mode', 'meom_disable_maintenance_mode' );
            add_action( 'wp_ajax_nopriv_meom_disable_maintenance_mode', 'meom_disable_maintenance_mode' );
            function meom_disable_maintenance_mode() {
                
                if ( ! isset($_POST['count']) ) return wp_send_json_error('ajax');
                
                if ( intval($_POST['count']) > 0 ) return wp_send_json_error('count');
                    
                $default_options = array( /* pasted from WPMM */ );
    
                if ( update_option( 'wpmm_settings', $default_options ) )
                    return wp_send_json_success();
                
                return wp_send_json_error('update');
            }
    
            /**
             * No enqueue from WPMM, use wpmm_footer and write JS from PHP to call admin-ajax.php
             */
            add_filter( 'wpmm_footer', 'wpmm_moem_footer', 10, 1 );
            function wpmm_moem_footer() { ?>
    <script>(function ($) {
    
        function updateWpmmOptions( count ) {
            $.ajax({
                url: '<?php echo admin_url( 'admin-ajax.php' ); ?>',
                type: "POST",
                cache: false,
                dataType: 'json',
                data: { action: 'meom_disable_maintenance_mode', count: count }
            }).done(function(response){
                if ( response.success ) location.reload()
            })
        }
    
        // Check the end of countdown
        function checkTimer() {
            let count = 0
            $('.countdown span').each(function() {
                if ( ! $(this).hasClass('separator') ) {
                    count += parseInt( $(this).text() )
                }
            })
            return count
        }
    
        $(document).ready(function () {
    
            // Call ajax when countdown == 0
            let checkCountdown = setInterval(function () {
    
                let timer = checkTimer()
    
                // On timer 0:00:00:00
                if ( 0 === timer ) {
                    
                    // Remove bounce animation
                    if ( $('.wrap').hasClass('bounce') ) $('.wrap').removeClass('bounce')
                    
                    // Slowly show loader after delay
                    $('body').prepend('<div id="loader" style="opacity:0"></div>')
                    
                    if ( $('#loader').length ) {
                        $('#loader').animate({ opacity: 1 }, 2000)
                        
                        // Call ajax
                        updateWpmmOptions( timer )
                        
                        clearTimeout(checkCountdown)
                    }
                }
            }, 1000)
    
        })
    })(jQuery)
    </script>
            <?php }
            
        }    
    }
    Thread Starter seds94

    (@seds94)

    CF7 doesn’t accept custom html anymore neither Multilingual Contact Form 7 with Polylang. “Smart” & Great!!

    • This reply was modified 2 years, 6 months ago by seds94.
    Thread Starter seds94

    (@seds94)

    I think the problem comes from a plugin update:
    – Forms work if I created them today or if they were created a long time ago and have never been updated recently.
    – The old ones that have been recently modified do not send anything whatever the sender.
    Can the plugin editor do anything, or respond? I am coming to the end of my development. Will I have to redo all my forms or should I use another plugin instead?

    Thread Starter seds94

    (@seds94)

    did you only changed recipient or created a new form with new recipient?

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