Skip Navigation

[Resolved] My data didn’t show when I use view’s “Pagination and Sliders Settings

This thread is resolved. Here is a description of the problem and solution.

Problem:

Plugin called "Reviewer", its developer give me the custom field about user score that the field's name is rwp_user_score.

I use "Pagination enabled with manual transition and AJAX", and set display 9 items, but as picture you can see, when I scrolled down the items below 9 didn't show the score anymore.
https://cdn.toolset.com/wp-content/uploads/2017/12/601379-601281_Screen_Shot_2017_12_24_at_7.08.51_PM.png?x41285

Solution:
here is a workaround, and I did below modification in your website:
1) change the source code of plugin "Reviewer", file \reviewer\public\includes\themes\theme-section-users-score.php, line 42, to:

<span v-cloak class="rwp-users-score-value" <?php echo $bg; ?> ><?php echo round(get_post_meta(get_the_ID(), 'rwp_user_score', ture), 1)?><i>/ <?php echo $maximum_score; ?></i></span>

2) edit the view "Software (font page)", in section "Loop Output Editor", click "CSS editor", add below codes:

span[v-cloak]{
display: block !important;
}

Relevant Documentation:

http://php.net/manual/en/function.round.php

This support ticket is created 6 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 12 replies, has 2 voices.

Last updated by Luo Yang 6 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#601379
601281-Screen_Shot_2017_12_24_at_7.09.30_PM.png
601281-Screen_Shot_2017_12_24_at_7.08.51_PM.png

I use "Pagination enabled with manual transition and AJAX", and set display 9 items, but as picture you can see, when I scrolled down the items below 9 didn't show the score anymore. I sent the same ticket before, but the supporter's timezone is too far to me, and this is really emergency cause my website gonna publish recently. You can see more details on the last ticket I submit. Thank you, I really need help ASAP.

What is the link to your site? hidden link

#601390

Dear Ning,

I assume we are talking about your another thread:
https://toolset.com/forums/topic/my-data-didnt-show-when-i-use-views-pagination-and-sliders-settings/

In your post, you said:
Is a plugin called "Reviewer", its developer give me the custom field about user score that the field's name is rwp_user_score
https://toolset.com/forums/topic/my-data-didnt-show-when-i-use-views-pagination-and-sliders-settings/#post-601376

So it is a compatibility problem.
How do you display the "score"? how do you insert into the post?
If it needs other plugin(Reviewer), please provide a downloadable URL for it, I need to duplicate and debug it in my localhost, thanks

#601394
Screen Shot 2017-12-25 at 1.35.21 PM.png
Screen Shot 2017-12-25 at 1.34.51 PM.png

I add the review box in the post as the screenshot you can see, and add the shortcode which I wanna have in the post. And the plugin is I buy in here: hidden link, so I don't know how to let you can download it.

And another thing, I create another page (hidden link the same view, only one place different is I choose the "No pagination", and it can show the all score, I create this page for you to campare.

#601397

I create the link to download the plugin, check it out: hidden link

#601400

Thanks for the details, I am downloading the files, and trying to duplicate same problem, will feedback if there is anything found

#601403

Here are what I found:
1) The plugin "Reviewer" needs "Item Purchase Code", so when I activate the plugin, in wordpress admin side, Dashboard-> Reviewer, I see a warning message:
Please register your Reviewer license before using the plugin. Go to Reviewer > License.
So I can not duplicate same problem without a valid "Item Purchase Code"

2) Then I checked it in your website, the problem page:
hidden link
If you check the HTML source code, you will be able to see below codes where should be able to display the "score":

<span v-cloak="" class="rwp-users-score-value"> {{ reviewsOverall }} <i>/ 5</i></span>

And you are using CSS codes to hide it:
hidden link

[v-cloak] {
    display: none!important;
}

So the problem is that:
the code {{reviewsOverall }} from plugin "Reviewer" does not work in Views AJAX pagination.

Can you confirm it?

If it is, ihere is some information from Views plugin side, Views AJAX pagination is using file "wp-admin/admin-ajax.php" to retrieve content with AJAX, this file is in the wordpress admin side, that means, you will need to register the cusotom shortcodes also in the wordpress admin side, I suggest you ask help from the author of plugin "Reviewer", check if it is possible to make the shortcode {{reviewsOverall }} work in the wordpress admin side.

#601404

Is there any other solution can resolved it? Beacuse the developer of Reviewer is on the Christmas vacation, and recently my "wp-admin/admin-ajax.php" has some error, but I don't have any html knowledge, really don't know how to fix it.

#601405

I assume you have confirmed the problem as I mentioned above:
the code {{reviewsOverall }} from plugin "Reviewer" does not work in Views AJAX pagination.

There isn't any existed solution for it, since there isn't "Reviewer license", the plugin file you provided above does not work in my side, so I can not duplicate the problem and debug the codes, currently you can use manual pagination instead of AJAX pagination, more help:
https://toolset.com/documentation/user-guides/views-pagination/

#601406

I can give you the license, try the code: hidden link

#601410
licence.JPG

I tried it in my localhost, but got this error:
The purchase code related to the envato username is not valid.

See screenshot: licence.JPG

Let me summarize my suggestions:
1) ask help from the author of plugin "Reviewer", check if it is possible to make the shortcode {{reviewsOverall }} work in the wordpress admin side.
2) provide a test site with same problem. Since it is a compatibility problem, according to our support policy
https://toolset.com/toolset-support-policy/

There isn't any ETA or warranty to fix it, if you agree, please fill below private detail box with login details and FTP access, also point out the problem page URL and view URL, I can try to debug it in a live website.

#601418

Thanks for the details, here is a workaround, and I did below modification in your website:
1) change the source code of plugin "Reviewer", file \reviewer\public\includes\themes\theme-section-users-score.php, line 42, from:

	<span v-cloak class="rwp-users-score-value" <?php echo $bg; ?> > {{ reviewsOverall }} <i>/ <?php echo $maximum_score; ?></i></span>

To:

	<span v-cloak class="rwp-users-score-value" <?php echo $bg; ?> ><?php echo round(get_post_meta(get_the_ID(), 'rwp_user_score', ture), 1)?><i>/ <?php echo $maximum_score; ?></i></span>

It will use PHP function to render the field "rwp_user_score" value, more help:
hidden link

2) edit the view "Software (font page)", in section "Loop Output Editor", click "CSS editor", add below codes:

span[v-cloak]{
display: block !important;
}

It will display the score values.

Please test again, check if it is fixed or not.

#601420

It's fixed! Really thank you!

#601423

You are welcome

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.