I have recently cloned a site to move it to the 'real' domain from the test domain. Now one of my views doesn't seem to be working any more, although it still works on the test domain. I have checked that I changed the URLs and can't find anything.
I have a nested view with counts of posts and an anchor link to display the posts on a seperate page using URL parameters.
The main view displays users of any role with no filters:
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
[wpv-conditional if="('[types usermeta="location"][/types]' eq check_user_from_same_location())"]
<div class = "row"> <strong>[wpv-user field="display_name"]</strong></div><br>
<div style = "border:solid black 1px; padding : 20px;">
<div class = "row">
<p>Last 7 days</p>
</div>
<div class = "row">
<div class = "col-xs-4 col-md-2">
<a href = "<em><u>hidden link</u></em>">Emails:</a> [wpv-view name="bm-comms-7-days" toc = "1"]</div>
<div class = "col-xs-4 col-md-2">
<a href = "<em><u>hidden link</u></em>">Phone:</a> [wpv-view name="bm-comms-7-days" toc = "2"]</div>
<div class = "col-xs-4 col-md-2">
<a href = "<em><u>hidden link</u></em>">Meetings:</a> [wpv-view name="bm-comms-7-days" toc = "3"]</div></div><br>
<div class = "row">
<div class = "col-xs-4 col-md-2">
New Jobs:
[wpv-view name="bm-new-jobs-7-days"]</div>
<div class = "col-xs-4 col-md-2">
CVs Sent:
[wpv-view name="bm-cvs-sent-7-days"]</div>
<div class = "col-xs-4 col-md-2">
Lost Jobs:
[wpv-view name="bm-lost-jobs-7-days"]</div>
<div class = "col-xs-4 col-md-2">
1st Interview:
[wpv-view name="bm-1st-interview-7-days"]</div>
<div class = "col-xs-4 col-md-2">
2nd Interview:
[wpv-view name="bm-2nd-interview-7-days"]</div>
<div class = "col-xs-4 col-md-2">
Placements:
[wpv-view name="bm-placements-7-days"]</div>
</div><br>
</div><br>
<div style = "border:solid black 1px; padding : 20px;">
<div class = "row">
<p>Last 30 days</p>
</div>
<div class = "row">
<div class = "col-xs-4 col-md-2">
<a href = "<em><u>hidden link</u></em>">Emails:</a> [wpv-view name="bm-comms-30-days" toc = "1"]</div>
<div class = "col-xs-4 col-md-2">
<a href = "<em><u>hidden link</u></em>">Phone:</a> [wpv-view name="bm-comms-30-days" toc = "2"]</div>
<div class = "col-xs-4 col-md-2">
<a href = "<em><u>hidden link</u></em>">Meetings:</a> [wpv-view name="bm-comms-30-days" toc = "3"]</div></div><br>
<div class = "row">
<div class = "col-xs-4 col-md-2">
New Jobs:
[wpv-view name="bm-new-jobs-30-days"]</div>
<div class = "col-xs-4 col-md-2">
CVs Sent:
[wpv-view name="bm-cvs-sent-30-days"]</div>
<div class = "col-xs-4 col-md-2">
Lost Jobs:
[wpv-view name="bm-lost-jobs-30-days"]</div>
<div class = "col-xs-4 col-md-2">
1st Interview:
[wpv-view name="bm-1st-interview-30-days"]</div>
<div class = "col-xs-4 col-md-2">
2nd Interview:
[wpv-view name="bm-2nd-interview-30-days"]</div>
<div class = "col-xs-4 col-md-2">
Placements:
[wpv-view name="bm-placements-30-days"]</div>
</div>
</div>
<br>
[/wpv-conditional]
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
[/wpv-no-items-found]
[wpv-layout-end]
You can see on this line a link to a view where I list the communications by this user in the last 30 days that have a toc=1 (type of communication = email), and then I display another view which counts the posts:
<a href = "hidden link">Emails:</a> [wpv-view name="bm-comms-30-days" toc = "1"]</div>
On the attached screenshots you can see that the one view is counting 2 emails in the last 30 days, but if I click on the link it comes up with 'No items found'.
Here is the comms-by-user-30-days view:
Selects 'Communications' with the following filters:
Post author filter
Select posts with the author's username determined by the URL parameter "author-filter"
Custom field filter
Select posts with custom field:
Type of communication is a number equal to URL_PARAM(toc)
AND
Date and Time is a number greater than or equal PAST_DAY(30)
And loop output:
<h3>Communications in last 30 days by [wpv-post-param var="author-filter"]</h3>
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<ul class="wpv-loop js-wpv-loop">
<wpv-loop>
<li>
[wpv-post-link]
</li>
</wpv-loop>
</ul>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
[/wpv-no-items-found]
[wpv-layout-end]
And this is the bm-comms-30-days view:
Selects 'Communications' with the following filters:
Post author filter
Select posts with the author set by the parent View.
Custom field filter
Select posts with custom field:
Type of communication is a number equal to VIEW_PARAM(toc)
AND
Date and Time is a number greater than PAST_DAY(30)
and the loop output:
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
</wpv-loop>
[wpv-found-count]
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"]0[/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]
I don't know why this is working on the test site, but not this one now that I've cloned it.. Argh.