Skip Navigation

[Resolved] Views not working after installing V1.11

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by MiquelC1907 5 years, 11 months ago.

Assigned support staff: Adriano.

Author
Posts
#345131

I am trying to: Revert back to previous version after upggrading to new Views version 1.11

#345136

Hi,

I've updated the Views plugin, and after it one view is not working (it could be there are more issues, but right now I've just detected one) .

I'm going to revert back to the previous version, but before doing so I'd like to know your instructions about the best way of doing it, and not losing the content modifications (Views) I've done in the last couple of days.

Last backup is 2 days old, on a site under construction, so since then I've done many changes in the site.

If possible I'd prefer not to restore a backup, and revert the plugin to the previous version.

Thanks,

Miquel

#345178

Hello,

You can safely revert it back to 1.10.1, no data gonna be lost. Just download the zip file from your account section and upload it manually into wp-content/plugins/wp-views.

Please describe with details the issue you just noticed, we need as most info as you can share in order to fix the issue.

#345278

Hi Adriano,

Some information about the issue.

- The View having issues is a "Display all results" type. Hence, it should output only text.

- Before the update it was oupting text, in a JSON way. (View is used as a "options" attributte for a Generic Input form field (CRED))

- After the update HTML markup was added. Below the View's shortcode output. You'll see a <div> and an <input> are output, before the text (JSON). This code is copied from the web page, using Chrome development tools.

I think this additional markup is was it's creating the issue, as the CRED generic field is not displayed.

<div id="wpv-view-layout-5389-CPID4938" class="js-wpv-view-layout js-wpv-layout-responsive" data-viewnumber="5389-CPID4938" data-pagination="{"ajax":"false","effect":"fade","duration":500,"stop_rollover":"false","cache_pages":"1","preload_pages":"1","pre_reach":"1","spinner":"default","spinner_image":"<em><u>hidden link</u></em>","callback_next":"","max_pages":0,"page":1}" style="width: 440px;">
<input type="hidden" id="js-wpv-pagination-page-permalink" value="/sp/product/check-in-barcelona-centro/?wpv_view_count=5389-CPID4938&wpv_paged=1">
{"value":"5362","label":"House of the lost day"},{"value":"5361","label":"casa de la pradera 27-10 V10"},{"value":"5360","label":"casa de la pradera 27-10 V9"},{"value":"5359","label":"casa de la pradera 27-10 V8"},{"value":"5358","label":"casa de la pradera 27-10 V7"},{"value":"5357","label":"casa de la pradera 27-10 V6"},{"value":"5356","label":"casa de la pradera 27-10 V5"},{"value":"5355","label":"casa de la pradera 27-10 V4"},{"value":"5354","label":"casa de la pradera 27-10 V3"},{"value":"5353","label":"casa de la pradera 27-10 V2"},{"value":"5352","label":"casa de la pradera 27-10 V2"},{"value":"5350","label":"casa de la pradera 27-10 V1"}
</div>

If a patch for this bug is coming soon, I can wait a couple of days, and test it before reverting back to the previous plugin version. This way you can have feedback about the patch having fixed the issue.

Thanks,

Miquel

#345294

Hello,

We are aware about that issue, we are working in order to make those HTML elements optional. For now we do have a workaround. You just need to add the snippet below in functions.php theme's file:

add_filter( 'wpv_filter_wpv_view_shortcode_output', 'prefix_clean_view_output', 5, 2 );

function prefix_clean_view_output( $out, $id ) {
    if ( $id == '375' ) {
        $start = strpos( $out, '<!-- wpv-loop-start -->' );
        if ( 
            $start !== false
            && strrpos( $out, '<!-- wpv-loop-end -->', $start ) !== false
        ) {
            $start = $start + strlen( '<!-- wpv-loop-start -->' );
            $out = substr( $out , $start );
            $end = strrpos( $out, '<!-- wpv-loop-end -->' );
            $out = substr( $out, 0, $end );
        }
    }
    return $out;
}

Replace 375 with your Views ID and those HTML elements will be removed from your site. We needed those elements in order to add new features like infinite scroll. We will think in a solution for this soon.

#345558

Thanks.