Resultados de búsqueda para 'json error'

Viewing 15 results - 121 through 135 (of 152 total)
  • No se si termino de pillar el problema, pero el action transition_post_status que has mencionado lo veo idóneo para este use case, ¿no? ¿por qué no te vale?

    add_action( 'transition_post_status', 'cyb_push_notification', 10, 3 );
    function cyb_push_notification( $new_status, $old_status, $post ) {
    
        // Prueba la combinación de $new_status y $old_status
        // que te interese
        if( 'publish' === $old_status ) return;
        if( 'publish' !== $new_status ) return;
    
        $request_args['headers'] =  [
            'Authorization' => 'key=<SERVER KEY>',
            'Content-Type'  => 'application/json'
        ];
    
        $request_args['body'] =  [
            //....
        ];
    
        // wp_remote_post() utiliza cURL si está disponible
        // Ver https://developer.wordpress.org/reference/functions/wp_remote_post/
        // Ver https://developer.wordpress.org/reference/functions/wp_remote_request/
        $response = wp_remote_post(
            'https://fcm.googleapis.com/fcm/send',
            $request_args
        );
     
        if( is_wp_error( $response ) ) {
            error_log( $response->get_error_message() );
        }
    
    }

    Ahora me centro en el detalle de «la primera vez que se publique». Entiendo que si un post fue publicado, luego despublicado y luego publicado otra vez, entonces no quieres hacer el push de nuevo. Se me ocurre, por ejemplo, utilizar un custom field:

    add_action( 'transition_post_status', 'cyb_push_notification', 10, 3 );
    function cyb_push_notification( $new_status, $old_status, $post ) {
    
        // Si la notificación para este post ya se envió ...
        if( '1' == get_post_meta( $post->ID, 'notification_sent' , true ) ) return; 
    
        $request_args = [
            // ....
        ]
    
        $response = wp_remote_post(
            'https://fcm.googleapis.com/fcm/send',
            $request_args
        );
     
        if( is_wp_error( $response ) ) {
            error_log( $response->get_error_message() );
        } else {
            update_post_meta( $post->ID, 'notification_sent', '1' );
        }
    
    }

    Algo así creo que podría servirte.

    • Buenas tardes,

      Estoy volviéndome loco con este asunto, a ver si podéis ayudarme.

      Estoy creando un portal donde los visitantes al clikar en un botón, se abra la librería de medios para subir o elegir una de las imágenes.
      Me estoy dando cuenta de que si estoy logueado si me funciona pero si soy un visitante no me funciona porque da error de admin-ajax. Hay alguna posibilidad de saltarse esta seguridad para que puedan subir o visualizar las imágenes?

      el html es sin mas un input, y el js seria este:

      jQuery('input[type=button]').on( 'click', function() {
           ids_select  = [];
           var frame   = wp.media({
                 title    : 'Insertar Imagen',
                 multiple : false,
                 library  : { type : 'image'},
                 button   : { text : 'Insert' }
           });
      
           frame.on( 'open', function() {
                 attachments = frame.state().toJSON();
                 attachment  = attachments.library._byId;                    
           });
      
           frame.on( 'select', function() {
                 attachment  = frame.state().get('selection').toJSON();
                 jQuery.each( attachment, function( i, item ) {
                        img     = attachment[i].url;
                 });
           });
      
           frame.open();
      })

      Entiendo que el problema no está en el js sino en la seguridad del ajax no estando logueado.

      Muchas gracias por la ayuda

      • Este debate fue modificado hace 8 años, 6 meses por inigonz.
    Iniciador del debate emevisual

    (@emevisual)

    aqui esta el codigo de alerta

    var loder_html = ‘<div class=»docdirect-loader-wrap»><div class=»docdirect-loader»><div class=»bounce1″></div><div class=»bounce2″></div><div class=»bounce3″></div></div></div>’;

    //Preloader
    jQuery(window).load(function() {
    jQuery(«.preloader-outer»).delay(2000).fadeOut();
    jQuery(«.pins»).delay(1500).fadeOut(«slow»);
    });

    /*————————————–
    COMMING SOON COUNTER
    ————————————–*/
    $(‘#comming-countdown’).countdown({
    date: ’10/5/2017 13:41:59′,
    offset: -100,
    day: ‘Day’,
    days: ‘Days’
    },function () {
    alert(‘Done!’);
    });

    //SVG Inject
    if ($(«.geo-locate-me»).length) {
    $(«.geo-locate-me»).svgInject();
    };

    /*if ($(«.verified-user»).length) {
    $(«.verified-user»).svgInject();
    };*/

    //Toogle Radius Search
    jQuery(document).on(‘click’,’.geodistance’,function(){
    jQuery(‘.geodistance_range’).toggle();
    });
    /*————————————–
    DOCTOR’S GALLERY
    ————————————–*/
    $(«#tg-photosgallery»).owlCarousel({
    autoPlay: true,
    items: 3,
    itemsDesktop: [1199, 3],
    itemsDesktopSmall: [991, 2],
    itemsTabletSmall: [568, 1],
    slideSpeed: 300,
    paginationSpeed: 400,
    pagination: false,
    navigation: true,
    navigationText: [
    «<i class=’tg-prev fa fa-angle-left’></i>»,
    «<i class=’tg-next fa fa-angle-right’></i>»
    ]
    });
    /*————————————–
    PRETTY PHOTO GALLERY
    ————————————–*/
    $(«a[data-rel]»).each(function () {
    $(this).attr(«rel», $(this).data(«rel»));
    });
    $(«a[data-rel^=’prettyPhoto’]»).prettyPhoto({
    animation_speed: ‘normal’,
    theme: ‘dark_square’,
    slideshow: 3000,
    autoplay_slideshow: false,
    social_tools: false,
    show_title: false /* true/false */
    });

    /*————————————–
    GRAPH
    ————————————–*/

    /*————————————–
    THEME ACCORDION
    ————————————–*/
    $(‘#accordion .tg-panel-heading’).on(‘click’,function () {
    $(‘.tg-panel-heading’).removeClass(‘active’);
    $(this).parents(‘.tg-panel-heading’).addClass(‘active’);
    $(‘.panel’).removeClass(‘active’);
    $(this).parent().addClass(‘active’);
    });

    /*
    * @Contact Form
    * @return{}
    */
    jQuery(‘.contact_wrap’).on(‘click’,’.contact_now’,function(e){
    e.preventDefault();
    var $this = jQuery(this);

    var success = $this.parents(‘.form-data’).data(‘success’);
    var error = $this.parents(‘.form-data’).data(‘error’);
    var email = $this.parents(‘.form-data’).data(‘email’);

    var serialize_data = $this.parents(‘.contact_wrap’).find(‘.contact_form’).serialize();
    var dataString = serialize_data+’&success=’+success+’&error=’+error+’&email=’+email+’&action=docdirect_submit_contact’;

    $this.parents(‘.contact_wrap’).find(‘.message_contact’).html(»).hide();
    jQuery($this).append(«<i class=’fa fa-refresh fa-spin’></i>»);
    $this.parents(‘.contact_wrap’).find(‘.message_contact’).removeClass(‘alert-success’);
    $this.parents(‘.contact_wrap’).find(‘.message_contact’).removeClass(‘alert-danger’);

    jQuery.ajax({
    type: «POST»,
    url: scripts_vars.ajaxurl,
    data: dataString,
    dataType:»json»,
    success: function(response) {
    jQuery($this).find(‘i’).remove();
    jQuery(‘.message_contact’).show();
    if( response.type == ‘error’ ) {
    $this.parents(‘.contact_wrap’).find(‘.message_contact’).addClass(‘alert alert-danger’).show();
    $this.parents(‘.contact_wrap’).find(‘.message_contact’).html(response.message);
    } else{
    $this.parents(‘.contact_wrap’).find(‘.contact_form’).get(0).reset();
    $this.parents(‘.contact_wrap’).find(‘.message_contact’).addClass(‘alert alert-success’).show();
    $this.parents(‘.contact_wrap’).find(‘.message_contact’).html(response.message);
    }
    }
    });

    return false;

    });

    /*
    * @Make Review
    * @return{}
    */
    jQuery(document).on(‘click’,’.make-review’,function(e){
    e.preventDefault();
    var $this = jQuery(this);

    var serialize_data = $this.parents(‘.form-review’).serialize();
    var dataString = serialize_data+’&action=docdirect_make_review’;

    jQuery(‘.message_contact’).html(»).hide();
    jQuery($this).append(«<i class=’fa fa-refresh fa-spin’></i>»);
    jQuery(‘.message_contact’).removeClass(‘alert-success’);
    jQuery(‘.message_contact’).removeClass(‘alert-danger’);

    jQuery.ajax({
    type: «POST»,
    url: scripts_vars.ajaxurl,
    data: dataString,
    dataType:»json»,
    success: function(response) {
    $this.find(‘i’).remove();
    jQuery(‘.message_contact’).show();
    if( response.type == ‘error’ ) {
    jQuery(‘.message_contact’).addClass(‘alert alert-danger’).show();
    jQuery(‘.message_contact’).html(response.message);
    } else{
    jQuery(‘.message_contact’).addClass(‘alert alert-success’).show();
    jQuery(‘.message_contact’).html(response.message);
    if( response.html == ‘refresh’ ){
    window.location.reload();
    }
    $this.parents(‘.form-review’).find(‘.contact_form’).get(0).reset();

    }
    }
    });

    return false;

    });

    /*————————————–
    SCHEDULE SLIDER
    ————————————–*/
    jQuery(«#tg-schedule-slider»).owlCarousel({
    autoPlay: true,
    items: 1,
    slideSpeed: 300,
    paginationSpeed: 400,
    pagination: false,
    navigation: true,
    navigationText: [
    «<i class=’tg-prev fa fa-angle-left’></i>»,
    «<i class=’tg-next fa fa-angle-right’></i>»
    ]
    });

    /*
    * @Contact Form
    * @return{}
    */
    jQuery(‘.doc-contact’).on(‘click’,’.contact_me’,function(e){
    e.preventDefault();
    var $this = jQuery(this);

    var serialize_data = $this.parents(‘.doc-contact’).find(‘.contact_form’).serialize();
    var dataString = serialize_data+’&action=docdirect_submit_me’;
    $this.append(«<i class=’fa fa-refresh fa-spin’></i>»);

    jQuery.ajax({
    type: «POST»,
    url: scripts_vars.ajaxurl,
    data: dataString,
    dataType:»json»,
    success: function(response) {
    $this.find(‘i’).remove();
    jQuery(‘.message_contact’).show();
    if (response.type == ‘success’) {
    jQuery.sticky(response.message, {classList: ‘success’, speed: 200, autoclose: 5000,position: ‘top-right’,});
    $this.parents(‘.doc-contact’).find(‘.contact_form’).get(0).reset();
    } else {
    jQuery.sticky(response.message, {classList: ‘important’, speed: 200, autoclose: 5000});
    }
    }
    });

    return false;

    });

    /*
    * @Report User
    * @return{}
    */
    jQuery(‘.doc-claim’).on(‘click’,’.report_now’,function(e){
    e.preventDefault();
    var _this = jQuery(this);

    var serialize_data = jQuery(‘.claim_form’).serialize();
    var dataString = serialize_data+’&action=docdirect_submit_claim’;
    _this.append(«<i class=’fa fa-refresh fa-spin’></i>»);

    jQuery.ajax({
    type: «POST»,
    url: scripts_vars.ajaxurl,
    data: dataString,
    dataType:»json»,
    success: function(response) {
    _this.find(‘i’).remove();
    if (response.type == ‘success’) {
    jQuery.sticky(response.message, {classList: ‘success’, speed: 200, autoclose: 5000,position: ‘top-right’,});
    _this.parents(‘.doc-claim’).find(‘.claim_form’).get(0).reset();
    } else {
    jQuery.sticky(response.message, {classList: ‘important’, speed: 200, autoclose: 5000});
    }
    }
    });

    return false;

    });

    /* —————————————
    rtegistration Ajax
    ————————————— */
    jQuery(‘.do-registration-form’).on(‘click’, ‘.do-register-button’, function (event) {
    event.preventDefault();
    var $this = jQuery(this);
    $this.append(‘<i class=»fa fa-refresh fa-spin»></i>’);
    jQuery(‘.registration-message’).html(»).hide();
    jQuery.ajax({
    type: «POST»,
    url: scripts_vars.ajaxurl,
    data: jQuery(‘.do-registration-form’).serialize() + ‘&action=docdirect_user_registration’,
    dataType: «json»,
    success: function (response) {
    $this.find(‘i.fa-spin’).remove();
    jQuery(‘.registration-message’).show();
    if (response.type == ‘success’) {
    jQuery.sticky(response.message, {classList: ‘success’, speed: 200, autoclose: 5000,position: ‘top-right’,});
    } else {
    jQuery.sticky(response.message, {classList: ‘important’, speed: 200, autoclose: 5000});
    }
    }
    });
    });

    /* —————————————
    Login Ajax
    ————————————— */
    jQuery(‘.do-login-form’).on(‘click’, ‘.do-login-button’, function (event) {
    event.preventDefault();
    var $this = jQuery(this);
    $this.append(‘<i class=»fa fa-refresh fa-spin»></i>’);
    jQuery(‘.login-message’).html(»).hide();
    jQuery.ajax({
    type: «POST»,
    url: scripts_vars.ajaxurl,
    data: jQuery(‘.do-login-form’).serialize() + ‘&action=docdirect_ajax_login’,
    dataType: «json»,
    success: function (response) {
    $this.find(‘i.fa-spin’).remove();
    jQuery(‘.login-message’).show();
    if (response.type == ‘success’) {
    jQuery.sticky(response.message, {classList: ‘success’, speed: 200, autoclose: 5000,position: ‘top-right’,});
    window.location.reload();
    } else {
    jQuery.sticky(response.message, {classList: ‘important’, speed: 200, autoclose: 5000});
    }
    }
    });
    });

    /* —————————————
    Add to favorites
    ————————————— */
    jQuery(document).on(‘click’, ‘.add-to-fav’, function (event) {
    event.preventDefault();

    if( user_status == ‘false’ ){
    jQuery.sticky(fav_message, {classList: ‘important’, speed: 200, autoclose: 7000});
    return false;
    }

    var _this = jQuery(this);
    var wl_id = _this.data(‘wl_id’);
    _this.append(‘<i class=»fa fa-refresh fa-spin»></i>’);
    _this.addClass(‘loading’);

    jQuery.ajax({
    type: «POST»,
    url: scripts_vars.ajaxurl,
    data: ‘wl_id=’+wl_id+’&action=docdirect_update_wishlist’,
    dataType: «json»,
    success: function (response) {
    _this.removeClass(‘loading’);
    _this.find(‘i.fa-spin’).remove();
    jQuery(‘.login-message’).show();
    if (response.type == ‘success’) {
    jQuery.sticky(response.message, {classList: ‘success’, speed: 200, autoclose: 5000,position: ‘top-right’,});
    _this.removeClass(‘tg-like add-to-fav’);
    _this.addClass(‘tg-dislike’);
    } else {
    jQuery.sticky(response.message, {classList: ‘important’, speed: 200, autoclose: 5000});
    }
    }
    });
    });

    /* —————————————
    Add to favorites
    ————————————— */
    jQuery(document).on(‘click’, ‘.remove-wishlist’, function (event) {
    event.preventDefault();
    var _this = jQuery(this);
    var wl_id = _this.data(‘wl_id’);
    _this.append(‘<i class=»fa fa-refresh fa-spin»></i>’);
    _this.addClass(‘loading’);

    jQuery.ajax({
    type: «POST»,
    url: scripts_vars.ajaxurl,
    data: ‘wl_id=’+wl_id+’&action=docdirect_remove_wishlist’,
    dataType: «json»,
    success: function (response) {
    _this.removeClass(‘loading’);
    _this.find(‘i.fa-spin’).remove();

    if (response.type == ‘success’) {
    jQuery.sticky(response.message, {classList: ‘success’, speed: 200, autoclose: 5000,position: ‘top-right’,});
    _this.parents(‘#wishlist-‘+wl_id).remove();
    if( jQuery( ‘.tg-lists .tg-list’ ).length < 1 ){
    jQuery( ‘.tg-lists’ ).html(‘<div class=»tg-list»><p>’+fav_nothing+'</div>’);
    }

    } else {
    jQuery.sticky(response.message, {classList: ‘important’, speed: 200, autoclose: 5000});
    }
    }
    });
    });

    //Rating bars
    try {
    jQuery(‘#tg-userskill’).appear(function () {
    jQuery(‘.tg-skillholder’).each(function () {
    jQuery(this).find(‘.tg-skillbar’).animate({
    width: jQuery(this).attr(‘data-percent’)
    }, 2500);
    });
    });
    } catch (err) {}

    });

    var DocDirectCaptchaCallback = function() {
    grecaptcha.render(‘recaptcha_signin’, {‘sitekey’ : scripts_vars.site_key });
    grecaptcha.render(‘recaptcha_signup’, {‘sitekey’ : scripts_vars.site_key });
    };

    /* ————————————-
    SVG Injector
    ————————————– */

    ;(function($,window,document,undefined){var pluginName=’svgInject’;function Plugin(element,options){this.element=element;this._name=pluginName;this.init();}
    Plugin.prototype={init:function(){$(this.element).css(‘visibility’,’hidden’);this.swapSVG(this.element);},swapSVG:function(el){var imgURL=$(el).attr(‘src’);var imgID=$(el).attr(‘id’);var imgClass=$(el).attr(‘class’);var imgData=$(el).clone(true).data();var dimensions={w:$(el).attr(‘width’),h:$(el).attr(‘height’)};$.get(imgURL,function(data){var svg=$(data).find(‘svg’);if(typeof imgID!==undefined){svg=svg.attr(‘id’,imgID);}
    if(typeof imgClass!==undefined){var cls=(svg.attr(‘class’)!==undefined)?svg.attr(‘class’):»;svg=svg.attr(‘class’,imgClass+’ ‘+cls+’ replaced-svg’);}
    $.each(imgData,function(name,value){svg[0].setAttribute(‘data-‘+name,value);});svg=svg.removeAttr(‘xmlns:a’);var ow=parseFloat(svg.attr(‘width’));var oh=parseFloat(svg.attr(‘height’));if(dimensions.w&&dimensions.h){$(svg).attr(‘width’,dimensions.w);$(svg).attr(‘height’,dimensions.h);}
    else if(dimensions.w){$(svg).attr(‘width’,dimensions.w);$(svg).attr(‘height’,(oh/ow)*dimensions.w);}
    else if(dimensions.h){$(svg).attr(‘height’,dimensions.h);$(svg).attr(‘width’,(ow/oh)*dimensions.h);}
    $(el).replaceWith(svg);var js=new Function(svg.find(‘script’).text());js();});}};$.fn[pluginName]=function(options){return this.each(function(){if(!$.data(this,’plugin_’+pluginName)){$.data(this,’plugin_’+pluginName,new Plugin(this,options));}});};})(jQuery,window,document);

    /* ————————————-
    Map Styles
    ————————————– */
    function docdirect_get_map_styles(style){

    var styles = »;
    if(style == ‘view_1’){
    var styles = [{«featureType»:»administrative.country»,»elementType»:»geometry»,»stylers»:[{«visibility»:»simplified»},{«hue»:»#ff0000″}]}];
    }else if(style == ‘view_2’){
    var styles = [{«featureType»:»water»,»elementType»:»all»,»stylers»:[{«hue»:»#7fc8ed»},{«saturation»:55},{«lightness»:-6},{«visibility»:»on»}]},{«featureType»:»water»,»elementType»:»labels»,»stylers»:[{«hue»:»#7fc8ed»},{«saturation»:55},{«lightness»:-6},{«visibility»:»off»}]},{«featureType»:»poi.park»,»elementType»:»geometry»,»stylers»:[{«hue»:»#83cead»},{«saturation»:1},{«lightness»:-15},{«visibility»:»on»}]},{«featureType»:»landscape»,»elementType»:»geometry»,»stylers»:[{«hue»:»#f3f4f4″},{«saturation»:-84},{«lightness»:59},{«visibility»:»on»}]},{«featureType»:»landscape»,»elementType»:»labels»,»stylers»:[{«hue»:»#ffffff»},{«saturation»:-100},{«lightness»:100},{«visibility»:»off»}]},{«featureType»:»road»,»elementType»:»geometry»,»stylers»:[{«hue»:»#ffffff»},{«saturation»:-100},{«lightness»:100},{«visibility»:»on»}]},{«featureType»:»road»,»elementType»:»labels»,»stylers»:[{«hue»:»#bbbbbb»},{«saturation»:-100},{«lightness»:26},{«visibility»:»on»}]},{«featureType»:»road.arterial»,»elementType»:»geometry»,»stylers»:[{«hue»:»#ffcc00″},{«saturation»:100},{«lightness»:-35},{«visibility»:»simplified»}]},{«featureType»:»road.highway»,»elementType»:»geometry»,»stylers»:[{«hue»:»#ffcc00″},{«saturation»:100},{«lightness»:-22},{«visibility»:»on»}]},{«featureType»:»poi.school»,»elementType»:»all»,»stylers»:[{«hue»:»#d7e4e4″},{«saturation»:-60},{«lightness»:23},{«visibility»:»on»}]}];
    }else if(style == ‘view_3’){
    var styles = [{«featureType»:»water»,»stylers»:[{«saturation»:43},{«lightness»:-11},{«hue»:»#0088ff»}]},{«featureType»:»road»,»elementType»:»geometry.fill»,»stylers»:[{«hue»:»#ff0000″},{«saturation»:-100},{«lightness»:99}]},{«featureType»:»road»,»elementType»:»geometry.stroke»,»stylers»:[{«color»:»#808080″},{«lightness»:54}]},{«featureType»:»landscape.man_made»,»elementType»:»geometry.fill»,»stylers»:[{«color»:»#ece2d9″}]},{«featureType»:»poi.park»,»elementType»:»geometry.fill»,»stylers»:[{«color»:»#ccdca1″}]},{«featureType»:»road»,»elementType»:»labels.text.fill»,»stylers»:[{«color»:»#767676″}]},{«featureType»:»road»,»elementType»:»labels.text.stroke»,»stylers»:[{«color»:»#ffffff»}]},{«featureType»:»poi»,»stylers»:[{«visibility»:»off»}]},{«featureType»:»landscape.natural»,»elementType»:»geometry.fill»,»stylers»:[{«visibility»:»on»},{«color»:»#b8cb93″}]},{«featureType»:»poi.park»,»stylers»:[{«visibility»:»on»}]},{«featureType»:»poi.sports_complex»,»stylers»:[{«visibility»:»on»}]},{«featureType»:»poi.medical»,»stylers»:[{«visibility»:»on»}]},{«featureType»:»poi.business»,»stylers»:[{«visibility»:»simplified»}]}];

    }else if(style == ‘view_4’){
    var styles = [{«elementType»:»geometry»,»stylers»:[{«hue»:»#ff4400″},{«saturation»:-68},{«lightness»:-4},{«gamma»:0.72}]},{«featureType»:»road»,»elementType»:»labels.icon»},{«featureType»:»landscape.man_made»,»elementType»:»geometry»,»stylers»:[{«hue»:»#0077ff»},{«gamma»:3.1}]},{«featureType»:»water»,»stylers»:[{«hue»:»#00ccff»},{«gamma»:0.44},{«saturation»:-33}]},{«featureType»:»poi.park»,»stylers»:[{«hue»:»#44ff00″},{«saturation»:-23}]},{«featureType»:»water»,»elementType»:»labels.text.fill»,»stylers»:[{«hue»:»#007fff»},{«gamma»:0.77},{«saturation»:65},{«lightness»:99}]},{«featureType»:»water»,»elementType»:»labels.text.stroke»,»stylers»:[{«gamma»:0.11},{«weight»:5.6},{«saturation»:99},{«hue»:»#0091ff»},{«lightness»:-86}]},{«featureType»:»transit.line»,»elementType»:»geometry»,»stylers»:[{«lightness»:-48},{«hue»:»#ff5e00″},{«gamma»:1.2},{«saturation»:-23}]},{«featureType»:»transit»,»elementType»:»labels.text.stroke»,»stylers»:[{«saturation»:-64},{«hue»:»#ff9100″},{«lightness»:16},{«gamma»:0.47},{«weight»:2.7}]}];

    }else if(style == ‘view_5’){
    var styles = [{«featureType»:»water»,»elementType»:»geometry»,»stylers»:[{«color»:»#e9e9e9″},{«lightness»:17}]},{«featureType»:»landscape»,»elementType»:»geometry»,»stylers»:[{«color»:»#f5f5f5″},{«lightness»:20}]},{«featureType»:»road.highway»,»elementType»:»geometry.fill»,»stylers»:[{«color»:»#ffffff»},{«lightness»:17}]},{«featureType»:»road.highway»,»elementType»:»geometry.stroke»,»stylers»:[{«color»:»#ffffff»},{«lightness»:29},{«weight»:0.2}]},{«featureType»:»road.arterial»,»elementType»:»geometry»,»stylers»:[{«color»:»#ffffff»},{«lightness»:18}]},{«featureType»:»road.local»,»elementType»:»geometry»,»stylers»:[{«color»:»#ffffff»},{«lightness»:16}]},{«featureType»:»poi»,»elementType»:»geometry»,»stylers»:[{«color»:»#f5f5f5″},{«lightness»:21}]},{«featureType»:»poi.park»,»elementType»:»geometry»,»stylers»:[{«color»:»#dedede»},{«lightness»:21}]},{«elementType»:»labels.text.stroke»,»stylers»:[{«visibility»:»on»},{«color»:»#ffffff»},{«lightness»:16}]},{«elementType»:»labels.text.fill»,»stylers»:[{«saturation»:36},{«color»:»#333333″},{«lightness»:40}]},{«elementType»:»labels.icon»,»stylers»:[{«visibility»:»off»}]},{«featureType»:»transit»,»elementType»:»geometry»,»stylers»:[{«color»:»#f2f2f2″},{«lightness»:19}]},{«featureType»:»administrative»,»elementType»:»geometry.fill»,»stylers»:[{«color»:»#fefefe»},{«lightness»:20}]},{«featureType»:»administrative»,»elementType»:»geometry.stroke»,»stylers»:[{«color»:»#fefefe»},{«lightness»:17},{«weight»:1.2}]}];

    }else if(style == ‘view_6’){
    var styles = [{«featureType»:»landscape»,»stylers»:[{«hue»:»#FFBB00″},{«saturation»:43.400000000000006},{«lightness»:37.599999999999994},{«gamma»:1}]},{«featureType»:»road.highway»,»stylers»:[{«hue»:»#FFC200″},{«saturation»:-61.8},{«lightness»:45.599999999999994},{«gamma»:1}]},{«featureType»:»road.arterial»,»stylers»:[{«hue»:»#FF0300″},{«saturation»:-100},{«lightness»:51.19999999999999},{«gamma»:1}]},{«featureType»:»road.local»,»stylers»:[{«hue»:»#FF0300″},{«saturation»:-100},{«lightness»:52},{«gamma»:1}]},{«featureType»:»water»,»stylers»:[{«hue»:»#0078FF»},{«saturation»:-13.200000000000003},{«lightness»:2.4000000000000057},{«gamma»:1}]},{«featureType»:»poi»,»stylers»:[{«hue»:»#00FF6A»},{«saturation»:-1.0989010989011234},{«lightness»:11.200000000000017},{«gamma»:1}]}];
    } else{
    var styles = [{«featureType»:»administrative.country»,»elementType»:»geometry»,»stylers»:[{«visibility»:»simplified»},{«hue»:»#ff0000″}]}];
    }
    return styles;
    }

    /* ————————————-
    Validate Amount
    ————————————– */
    function validateAmount(_this) {
    if (isNaN(jQuery.trim(jQuery(_this).val()))) {
    jQuery(_this).val(«»);

    } else {
    var amt = jQuery(_this).val();
    if (amt != ») {
    if (amt.length > 16) {
    amt = amt.substr(0, 16);
    jQuery(_this).val(amt);
    }
    //amount = amt;
    return true;
    } else {
    //amount = gloAmount;
    return true;
    }
    }
    }

    /* ————————————-
    Init Full Width Sections
    ————————————– */
    builder_full_width_section(); //Init Sections
    var $ = window.jQuery;
    $(window).off(«resize.sectionSettings»).on(«resize.sectionSettings», builder_full_width_section);
    function builder_full_width_section() {
    var $sections = jQuery(‘.main-page-wrapper .stretch_section’);

    jQuery.each($sections, function (key, item) {
    var _sec = jQuery(this);
    var _sec_full = _sec.next(«.section-current-width»);
    _sec_full.length || (_sec_full = _sec.parent().next(«.section-current-width»));

    var _sec_margin_left = parseInt(_sec.css(«margin-left»), 10);
    var _sec_margin_right = parseInt(_sec.css(«margin-right»), 10);
    var offset = 0 – _sec_full.offset().left – _sec_margin_left;
    var width = jQuery(window).width();

    if (_sec.css({
    position: «relative»,
    left: offset,
    «box-sizing»: «border-box»,
    width: jQuery(window).width()
    }), !_sec.hasClass(«stretch_data»)) {

    var padding = -1 * offset;

    0 > padding && (padding = 0);
    var paddingRight = width – padding – _sec_full.width() + _sec_margin_left + _sec_margin_right;
    0 > paddingRight && (paddingRight = 0), _sec.css({
    «padding-left»: padding + «px»,
    «padding-right»: paddingRight + «px»
    })
    }
    });
    }

    /**
    * Mega Menu
    */
    jQuery(function ($) {

    function hoverIn() {
    var a = $(this);
    var nav = a.closest(‘.tg-navigation’);
    var mega = a.find(‘.mega-menu’);
    var offset = rightSide(nav) – leftSide(a);
    mega.width(Math.min(rightSide(nav), columns(mega)*325));
    mega.css(‘left’, Math.min(0, offset – mega.width()));
    }

    function hoverOut() {
    }

    function columns(mega) {
    var columns = 0;
    mega.children(‘.mega-menu-row’).each(function () {
    columns = Math.max(columns, $(this).children(‘.mega-menu-col’).length);
    });
    return columns;
    }

    function leftSide(elem) {
    return elem.offset().left;
    }

    function rightSide(elem) {
    return elem.offset().left + elem.width();
    }

    $(‘.tg-navigation .menu-item-has-mega-menu’).hover(hoverIn, hoverOut);

    });

    /* ————————————-
    Form Serilization
    ————————————– */
    // Serialize Function
    $.fn.serializeObject=function(){«use strict»;var a={},b=function(b,c){var d=a[c.name];»undefined»!=typeof d&&d!==null?$.isArray(d)?d.push(c.value):a[c.name]=[d,c.value]:a[c.name]=c.value};return $.each(this.serializeArray(),b),a};

    lo quito pero no soluciono el problema…

    si alguien mas sabe que puedo hacer…le agadezco

    • Tridente

      (@tridente)


      Buenos días he comprobado un error en un página que estoy trabajando teniendo la siguiente versión del CMS

      Versión WordPress: 4.7.5
      Versión WooCommerce: 3.0.7

      En Woocommerce -> Ajustes -> Cuentas: Activo el Registro de usuario con la opción Activa el registro en la página «Finalizar compra» me indica el siguiente error y no me deja finalizar la compra.

      Error: SyntaxError: Unexpected token < in JSON at position 0

      ¿Sabéis a que puede ser debido?

    Foro: Plugins y Hacks
    En respuesta a: Jetpack
    Iniciador del debate alexurbanpop

    (@alexurbanpop)

    Además desde la app me sale la siguiente ventana de error: «The Jetpack site is inaccesible or returned and error: server eror. resquested mwethod jetpack.jsonAPI does not exist. [-32601]»

    • El mensaje que aparece es: «The proxy cache contains 637 entries. This may indicate that auto-captures a script with a changing url that causes a new cache entry to be created on each request. The proxy configuration page shows a solution to capture scripts with a changing url using a JSON config object».

      ¿Es un mensaje de error? ¿Cuál es el error? ¿Cómo se soluciona?

      Me da la impresión que cada cierto tiempo crea un archivo que contiene todos los scripts. El problema es que creo que no borra el anterior, y entonces tiene un montón de archivos creados. ¿Es eso? ¿Cómo dice que se soluciona?

      En el foro del propio plugin indican esto https://github.com/optimalisatie/above-the-fold-optimization/issues/42 Creo que es el mismo problema, pero me sigue sin quedar clara la solución.

      A ver si alguien lo aclara.

      Gracias.

    • Mi asunto es que la plantilla envía por defecto el pedido (booking en tes caso), pero no que sea así, necesito que mas bien esto llegue a un email para ser valorado y luego responder al cliente.
      La verdad no es necesario el carrito de compras ya que no hacemos la venta en línea hasta verificar los datos con el operador y luego con el cliente. Adjunto el código PHP donde creo que esto se hace.
      Gracias!

      <?php
      /**
       * Tour booking form view.
       *
       * @var AtBookingFormBase $booking_form
       * @var WC_Product_Tour   $product
       * @var assoc             $field_config
       * @var assoc             $field_errors
       * @var assoc             $field_values
       * @var assoc             $options
       *
       * @author    Themedelight
       * @package   Themedelight/AdventureTours
       * @version   3.0.0
       */
      
      $rendererer = new AtFormRendererHelper( array(
      	'field_config' => $field_config,
      	'field_vals' => $field_values,
      	'field_errors' => $field_errors,
      ) );
      if ( $field_errors ) {
      	// errors are rendered via title attribute, to disaply them via tooltips
      	$rendererer->init_js_errors( '#tourBookingForm input[title]' );
      }
      
      $is_wc_older_than_30 = version_compare( WC_VERSION, '3.0.0', '<');
      
      $config_variations_data = null;
      $plain_price_data = null;
      if ( $product->is_variable_tour() ) {
      	$config_variations_data = $product->get_available_variations();
      } else {
      	$plain_price_data = array(
      		'display_price' => $is_wc_older_than_30 
      			? $product->get_display_price()
      			: wc_get_price_to_display( $product, array( 'price' => '' ) ),
      
      		'display_regular_price' => $is_wc_older_than_30
      			? $product->get_display_price( $product->get_regular_price() ) 
      			: wc_get_price_to_display( $product, array( 'price' => $product->get_regular_price() ) ),
      
      	);
      }
      
      // WooCommerce Currency Switcher plugin is active
      if ( !empty( $GLOBALS['WOOCS'] ) ) {
      	$WOOCS = $GLOBALS['WOOCS'];
      	// if current user currency is different from defaut one and option 'is_multiple_allowed' is off
      	// - 'display_price' is not converted so we need convert it manually
      	if ( $WOOCS->default_currency != $WOOCS->current_currency && ! $WOOCS->is_multiple_allowed ) {
      		if ( $config_variations_data ) {
      			foreach ( $config_variations_data as &$_variation_details ) {
      				$_variation_details['display_price'] = (float) $WOOCS->raw_woocommerce_price( $_variation_details['display_price'] );
      				$_variation_details['display_regular_price'] = (float) $WOOCS->raw_woocommerce_price( $_variation_details['display_regular_price'] );
      			}
      		} elseif ( $plain_price_data ) {
      			$plain_price_data['display_price'] = (float) $WOOCS->raw_woocommerce_price( $plain_price_data['display_price'] );
      			$plain_price_data['display_regular_price'] = (float) $WOOCS->raw_woocommerce_price( $plain_price_data['display_regular_price'] );
      		}
      	}
      }
      
      TdJsClientScript::addScript( 'money_formatting_config', 'Theme.formatter.setConfig("money",' . wp_json_encode( array(
      	'mask' => sprintf( get_woocommerce_price_format(), get_woocommerce_currency_symbol(), '{amount}' ),
      	'decimal_separator' => wc_get_price_decimal_separator(),
      	'thousand_separator' => wc_get_price_thousand_separator(),
      	'decimals' => wc_get_price_decimals(),
      ) ) .');' );
      
      adventure_tours_load_datepicker_assets();
      
      TdJsClientScript::addScript( 'initTourBookingForm', 'Theme.tourBookingForm.init(' . wp_json_encode( array(
      	'formSelector' => '#tourBookingForm',
      	'availableDates' => $booking_form->get_booking_dates( $product, true ),
      	'dateFormat' => $booking_form->get_date_format( 'datepicker' ),
      	'timeFormat' => $booking_form->get_date_format( 'datepicker-time' ),
      	'plainPriceData' => $plain_price_data,
      	'variationsData' => $config_variations_data,
      	'disableAjax' => 'yes' != get_option( 'woocommerce_enable_ajax_add_to_cart' ),
      	'dateCalendarAvailableTicketsMessage' => $booking_form->calendar_show_left_tickets_format,
      	'timeSeletTextFormat' => $booking_form->time_select_text_format,
      	'useDatePickerForDateSelection' => $booking_form->user_datepicker_for_date_field, // to disable date calendar and have select element instead of it
      	// as 'wcml_multi_currency_is_ajax' action has been removed since 3.9.X, will use 'wc-ajax' action instead of standard 'wp_ajax_action'
      	'itemsDataPriceUrl' => home_url( '?wc-ajax=calculate_booking_items_price' )
      ) ) . ');' );
      ?>
      
      <a></a>
      <?php
      $notices = apply_filters( 'adventure_tours_booking_form_notices', array() );
      if ( $notices ) {
      	foreach ( $notices as $notice_type => $messages ) {
      		adventure_tours_render_template_part( 'templates/parts/notices', '', array(
      			'messages' => $messages,
      			'type' => $notice_type,
      		));
      	}
      }
      ?>
      <div class="form-block form-block--style3 form-block--tour-booking block-after-indent">
      <?php 
      	$form_title = apply_filters( 'adventure_tours_booking_form_title', esc_html__( 'Book the tour', 'adventure-tours'), $product );
      	if ( $form_title ) {
      		printf( '<h3 class="form-block__title">%s</h3>', esc_html( $form_title ) );
      	}
      ?>
      	<form id="tourBookingForm" method="POST">
      		<?php echo $rendererer->render(); ?>
      
      		<?php do_action( 'woocommerce_before_add_to_cart_button' ); ?>
      
      		<div class="form-block__price-details" data-role="price-explanation"></div>
      
      		<?php printf('<input class="form-block__button" type="submit" value="%s">',
      			esc_attr( apply_filters( 'adventure_tours_booking_form_btn_text', esc_html__( 'Book now', 'adventure-tours'), $product ) )
      		); ?>
      	</form>
      </div>
      • Este debate fue modificado hace 9 años, 3 meses por Fernando Tellado. Razón: Código salido de madre por no meterlo en un "code"
    • Hola!

      Le he dado mil vueltas y no consigo resolver un problema que tengo con los emails de confirmación del pedido. Debajo del desglose de la factura me sale un código, creo que es Json, no sé porque sale y queda bastante feo, parece un error y puede que haga dudar al cliente.

      Imagen:
      https://www.dropbox.com/s/jkqw876t0vup1y0/Unbenannt.png?dl=0

      Ojalá que alguien me pueda ayudar me gustaría poner mi tienda online lo antes posible.

      Gracias!

    • Hola buenos dias

      como dice el titulo no puedo entrar al admin no puedo loguearme me sale error 500 php, pero si puedo entrar en otras pestañas de la misma web, cuando pincho home sale el error.

      antes que apareciera eso instale un plugin que se llama heartbeat control, para bajarle el tiempo de ejecucion etc etc, eso por que el hosting me tumbo la web, comentando que estoy excediendo los recurso, desde ahi empezo la trama.

      web: tulibroenpdf.com
      pestaña para entrar tulibroenpdf/suspenso

      este es lo que muestra el archivo error_log:

      [19-Jun-2017 20:02:39 UTC] PHP Warning: DOMDocument::loadHTML(): htmlParseEntityRef: expecting ‘;’ in Entity, line: 1 in /home/tulibroe/public_html/wp-content/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-plugins-endpoint.php on line 214
      [20-Jun-2017 01:01:51 UTC] PHP Warning: DOMDocument::loadHTML(): htmlParseEntityRef: expecting ‘;’ in Entity, line: 1 in /home/tulibroe/public_html/wp-content/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-plugins-endpoint.php on line 214
      [20-Jun-2017 01:05:26 UTC] PHP Warning: DOMDocument::loadHTML(): htmlParseEntityRef: expecting ‘;’ in Entity, line: 1 in /home/tulibroe/public_html/wp-content/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-plugins-endpoint.php on line 214
      [20-Jun-2017 01:11:32 UTC] PHP Warning: DOMDocument::loadHTML(): htmlParseEntityRef: expecting ‘;’ in Entity, line: 1 in /home/tulibroe/public_html/wp-content/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-plugins-endpoint.php on line 214

      gracias por tu ayuda!

    Foro: WooCommerce
    Como el debate: Una línea por producto
    • Buenas tardes,

      Estoy modificando un WooCommerce para ajustarlo a las necesidades del cliente y me encuentro en un camino sin salida. El escenario es el siguiente:

      Un cliente compra un producto y cuando lo recibe en casa debe buscar el código único que tiene ese producto concreto (son tests, por lo que hay que identificarlos de forma única). Luego va a /mis-pedidos/ en la web e introduce dicho código en el item de su producto (he creado un formulario para tal efecto en cada línea del pedido) y el sistema lo añade como itemmeta wc_add_order_item_meta( $item_id, $key, $value, false ); Es ahí donde no encuentro solución, porque si compra dos productos iguales, WooCommerce los mete en una sola línea de pedido (marcada con un bonito ‘x2’). Necesito identificar cada producto por separado, aunque sean el mismo.

      Si le añado los productos desde el backend de uno en uno, cada item ocupa una línea del pedido y puedo asignarles a cada uno su código único.

      ¿Hay alguna forma de «separar» cada producto comprado en un item por línea? Gracias por adelantado.

      Este es el código para recorrer los pedidos del usuario y dentro de cada pedido, las líneas del mismo:

      <?php 
      	$order_items  = $order->get_items();
      	$number_items = count($order_items);
      	$iteracion 	  = 1;
      	$completed 	  = 0;
      
              foreach( $order_items as $item_id => $item_data ) :
              	// if (! isset( $_POST['name_of_nonce_field'] ) || ! wp_verify_nonce( $_POST['name_of_nonce_field'], 'name_of_my_action' ) ) {
      
      	        	// Update order with postmeta 
      				if ( isset($_POST['code1'.$iteracion]) ) {
      					if ( $_POST['code1'.$iteracion] === $_POST['code2'.$iteracion] ) {
      						// Add barcode
      						wc_add_order_item_meta($item_id, '_order_barcode', $_POST['code1'.$iteracion], false);
      						// Add checkbox
      						wc_add_order_item_meta($item_id, '_preserve_sample', $_POST['preserve_sample'.$iteracion], false);
      						// Add name if exist
      						if ( isset($_POST['name_product'.$iteracion]) ) {
      							wc_add_order_item_meta($item_id, 'name_product', $_POST['name_product'.$iteracion], false);
      						}
      						
      
      						?><p class="alert alert-success">Código correctamente introducido.</p><?php
      					} else {
      						?><p class="alert alert-warning">Los códigos no coinciden. Por favor, revíselos bien.</p><?php
      					}// End if equal
      				}// end if isset
      
              	// }// End if nonce
      			
      			$data_code = $order->get_item_meta($item_id, '_order_barcode', true);
      			$name_code = $order->get_item_meta($item_id, 'name_product', true);
      
      			?>
      			<article class="order-item <?php echo $item_data["name"] . ' ' . $order->get_order_number() . ' ' . $item_id; ?>">
      				<h3>Producto <b style="color:#004F51;"><?php echo $item_data["name"] ?></b> con número <b style="color:#004F51;"><?php echo $order->get_order_number() . '-' . $item_id; ?></b></h3>
      				<?php
      
      				if ( $data_code == '' ) : ?>
      					<div id="barcode_checkout_field" style="text-align: left; padding: 20px 30px;">
      						<form id="js-form-code" action="" method="POST">
      							<p><label for="code1<?php echo $iteracion; ?>">
      								Introduce el código de barras adjunto al kit de recolección de muestras recibido para el producto <a href="<?php echo get_permalink( $item_data["product_id"] ); ?>"><b style="color:#004F51;"><?php echo $item_data["name"] ?></b></a> con número <b style="color:#004F51;"><?php echo $order->get_order_number() . '-' . $item_id; ?></b>.
      							</label><br>
      							<input id="code1<?php echo $iteracion; ?>" name="code1<?php echo $iteracion; ?>" type="number" min="0" max="999999999" value></p>
      							
      							<p><label for="code2<?php echo $iteracion; ?>">
      								Para evitar errores, por favor, vuelva a introducir el código de barras
      							</label><br>
      							<input id="code2<?php echo $iteracion; ?>" name="code2<?php echo $iteracion; ?>" type="number" min="0" max="999999999" value></p>
      							
      							<p><label for="name_product<?php echo $iteracion; ?>">
      								Si lo desea, introduzca un nombre para identificarlo de los demás productos adquiridos. Ej: Muestra de María.
      							</label><br>
      							<input id="name_product<?php echo $iteracion; ?>" name="name_product<?php echo $iteracion; ?>" type="text" placeholder="Muestra de María" value="<?php echo $_POST['name_product']; ?>"></p>
      							
      							<p><label for="name_product<?php echo $iteracion; ?>">
      								¿Desea que conservemos su muestra?
      							</label><br>
      							<input id="preserve_sample<?php echo $iteracion; ?>" name="preserve_sample<?php echo $iteracion; ?>" type="checkbox" <?php echo $retVal = (isset($_POST['_preserve_sample'])) ? 'checked="checked"' : '' ; ?>></p>
      
      							<?php // wp_nonce_field( 'name_of_my_action', 'name_of_nonce_field' ); ?>
      							<p class="text-right"><input class="btn btn-primary" type="submit"></p>
      						</form>
      				    </div>
      				<?php else : ?>
      				<?php $completed++; ?>
      					<div id="barcode_checkout_field">
      						<p>Código introducido para su producto <b style="color:#004F51;"><?php echo $name_code; ?></b></a> : <?php echo $data_code; ?></p>
      					</div>
      					<?php $json_report = $order->get_item_meta($item_id, '_json_report', true); ?>
      					<?php if ($json_report) { ?>
      
      						<form action="<?php echo content_url( '/plugins/report-builder/generate-report.php' ); ?>" method="POST">								
      							<input style="display:none;" type="text" class="form-control" name="customer_name" id="customer_name"    value="<?php echo wp_get_current_user()->user_login; ?>">
      							<input style="display:none;" type="text" class="form-control" name="codebar"       id="codebar"    	 	 value="<?php echo $data_code; ?>">
      							<input style="display:none;" type="text" class="form-control" name="name_code"     id="name_code"    	 value="<?php echo $name_code; ?>">
      							<input style="display:none;" type="text" class="form-control" name="order_id"      id="order_id"    	 value="<?php echo $order_id; ?>">
      							<input style="display:none;" type="text" class="form-control" name="report_id"     id="report_id"   	 value="<?php echo $item_id; ?>">
      							<input style="display:none;" type="text" class="form-control" name="report_name"   id="report_name" 	 value="<?php echo $item_data['name']; ?>">
      							<input style="display:none;" type="text" class="form-control" name="json_report"   id="json_report" 	 value='<?php echo $json_report; ?>'>
      							<input type="submit" class="btn btn-primary" name="generate_report" value="Generar informe" style="margin:0 auto;">
      						</form>
      						<?php } else { ?>
      							<p>Aún no hemos terminado de analizar su muestra.</p>
      						<?php } // end if have json ?>
      				<?php endif; ?>
      
      				<?php $iteracion++;
      	        	
      				if ( $completed === $number_items ) {
      					// Change order status
      					$order->update_status('analyzing-sample', 'El cliente ha introducido todos los códigos del pedido.' ); // order note is optional, if you want to  add a note to order
      				}	?>
      			</article>  
              <?php endforeach;// end foreach ?>
    • no me funciona la wp api rest v2 hago la peticion “wp-json/wp/v2/posts” (127.0.0.1/wordpress-4.7.1/wordpress/wp-json/wp/v2/posts)
      y me dice q no exite (The requested URL /wordpress-4.7.1/wordpress/wp-json/wp/v2/posts was not found on this server.)
      tengo la ultima version de wordpress . q segun dice trae la wp appi rest en el core por lo q no la tengo q intalar…. he probado intalandosela y tampoco me funciona he probado incluso con wordpress 4.6.1 y nada

      hay q hacer algo mas para poder utilizar o cual puede ser el error
      saludos

    • no me funciona la wp api rest v2 hago la peticion «wp-json/wp/v2/posts» (127.0.0.1/wordpress-4.7.1/wordpress/wp-json/wp/v2/posts)
      y me dice q no exite (The requested URL /wordpress-4.7.1/wordpress/wp-json/wp/v2/posts was not found on this server.)
      tengo la ultima version de wordpress . q segun dice trae la wp appi rest en el core por lo q no la tengo q intalar…. he probado intalandosela y tampoco me funciona he probado incluso con wordpress 4.6.1 y nada

      hay q hacer algo mas para poder utilizar o cual puede ser el error
      saludos

    Buenas,
    En este hilo del foro inglés están haciendo seguimiento del error
    https://wordpress.org/support/topic/json_decode-expects-paramater-1-to-be-string/

    El autor de plugin indica que está trabajando para solucionarlo y sacar una nueva versión que lo arregle

    Un saludo

    PD: si te ha ayudado y consideras que no hace falta mas comentarios, da el tema por resuelto: en la columna izquierda: selector estado.

    • este es el error

      Warning: json_decode() expects parameter 1 to be string, array given in /home/rankeopty/public_html/wp-content/plugins/jetpack/_inc/lib/admin-pages/class.jetpack-admin-page.php on line 163

    • alexander_sp

      (@alexander_sp)


      Hola a todos!

      nunca había pasado, pero desde hace un par de semanas GOOGLE SEARCH CONSOLE me devuelve errores de rastreo muy raros(no son URL’s normales) varios como estos:
      http://www.XXX.es/wp-content/themes/north/js/smoothscroll.js?ver=8e49439446c061a42742bb39d613101c
      http://www.XXX.es/wp-content/cache/wp-cache-5f11622231b9b4758cd967ce5608e93d.html

      y de golpe y porrazo SEMRUSH me da 200 links con problemas 500, cosa que no había pasado.

      Entonces lo que he hecho es configurar bien WORDFENCE e instalar Anti-Malware from GOTMLS y este no me detecta nada grave, pero me alerta de POSIBLES PROBLEMAS en estos archivos:

      ../web/logs/ftp.log
      ?…/web/wp-admin/includes/class-pclzip.php
      ?…/web/wp-content/plugins/broken-link-checker/idn/uctc.php
      ?…/web/wp-content/plugins/broken-link-checker/includes/admin/links-page-js.php
      ?…/web/wp-content/plugins/captcha/bws_menu/js/shortcode-button.js
      ?…/web/wp-content/plugins/js_composer/assets/lib/bower/ace-builds/src-min-noconflict/worker-css.js
      ?…/web/wp-content/plugins/js_composer/assets/lib/bower/json-js/json2.min.js
      ?…/web/wp-content/plugins/js_composer/assets/lib/bower/lessjs/dist/less.min.js
      ?…/web/wp-content/plugins/js_composer/assets/lib/php.default/php.default.min.js
      ?…/web/wp-content/plugins/js_composer/include/classes/editors/class-vc-backend-editor.php
      ?…/web/wp-content/plugins/js_composer/include/classes/editors/class-vc-frontend-editor.php
      ?…/web/wp-content/plugins/revslider/public/assets/js/extensions/revolution.extension.actions.min.js
      ?…/web/wp-content/plugins/revslider/public/assets/js/extensions/source/revolution.extension.actions.js
      ?…/web/wp-content/plugins/sitepress-multilingual-cms/embedded/twig/twig/lib/Twig/Environment.php
      ?…/web/wp-content/plugins/sitepress-multilingual-cms/embedded/twig/twig/lib/Twig/Test/IntegrationTestCase.php
      ?…/web/wp-content/plugins/w3-total-cache/ConfigCompiler.php
      ?…/web/wp-content/plugins/w3-total-cache/PgCache_ContentGrabber.php
      ?…/web/wp-content/plugins/w3-total-cache/lib/Nusoap/class.soapclient.php
      ?…/web/wp-content/plugins/w3-total-cache/lib/Nusoap/nusoap.php
      ?…/web/wp-content/plugins/w3-total-cache/pub/js/metadata.js
      ?…/web/wp-content/plugins/wordfence/js/jquery-ui-timepicker-addon.js
      ?…/web/wp-content/plugins/wordfence/js/jquery.dataTables.min.js
      ?…/web/wp-content/plugins/wordpress-seo/js/dist/jquery.tablesorter.min.js
      ?…/web/wp-content/themes/north/js/jquery.mb.YTPlayer.js
      ?…/web/wp-content/uploads/js_composer/assets/lib/bower/ace-builds/src-min-noconflict/worker-css.js
      ?…/web/wp-content/uploads/js_composer/assets/lib/bower/json-js/cycle.js
      ?…/web/wp-content/uploads/js_composer/assets/lib/bower/json-js/json.js
      ?…/web/wp-content/uploads/js_composer/assets/lib/bower/json-js/json2.js
      ?…/web/wp-content/uploads/js_composer/assets/lib/bower/lessjs/dist/less.js
      ?…/web/wp-content/uploads/js_composer/assets/lib/bower/lessjs/dist/less.min.js
      ?…/web/wp-content/uploads/js_composer/assets/lib/php.default/php.default.min.js
      ?…/web/wp-includes/js/json2.js
      ?…/web/wp-includes/js/json2.min.js
      ?…/web/wp-includes/js/tw-sack.js
      ?…/web/wp-includes/js/tw-sack.min.js
      ?…/web/wp-includes/js/jquery/jquery.form.min.js
      ?…/web/wp-includes/js/jquery/jquery.schedule.js
      ?…/web/wp-includes/js/swfupload/swfupload.js
      ?…/web/wp-includes/js/tinymce/tiny_mce_popup.js

      Y justamente hace unos días que mi página ha bajado en el PAGERANK considerablemente.
      Por lo cual sospecho que pueden haberme metido algún malwrere.

      Sabéis que puedo hacer al respecto?¿

      Gracias de antemano!

      • Este debate fue modificado hace 10 años por alexander_sp.
Viewing 15 results - 121 through 135 (of 152 total)