Thanks for the details, I can login into your website, where I can see the problem you mentioned above:
I have deleted the publication where the "Volltext" field remains empty
Please point out the problem post URL, thanks
Hi Luo,
well, there are many posts where the problem occurs. The one I mentioned (https://toolset.com/forums/topic/output-of-notice-when-view-field-has-no-value/page/2/#post-2196691) that I deleted and recreated still doesn't show the output of the field "Volltext":
hidden link
And this one isn't showing the output of the field "Heftnummer und/oder Seitenzahl":
hidden link
This one isn't showing the output of the field "Bibliografische Angaben":
hidden link
I don't see a pattern in there. It's very strange. I hope you can find the reason for this problem and can fix it.
Thanks a lot!
-Martin
Hi Luo,
the links I posted are pointing to the wrong domain. It has to be test.nationalpark-unteres-odertal.de and not 2021.nationalpark-unteres-odertal.de. Sorry for the inconvenience...
I have tried to replace the those URLs with the new domain name, and tried these URLs:
hidden link
hidden link
hidden link
None of them work in your test website, please check it, make sure your test site is ready for debug, thanks
Hi Luo,
thanks for checking the links. The site gave me critical errors. I don't know why. Maybe temporary issue with the hosting provider...
I checked the links and am able to reach them:
hidden link
hidden link
hidden link
Please try again.
Thank you!
OK, we can handle the questions one by one:
Q1) "Volltext" field
Please edit the problem "Publikation" post you mentioned above:
There isn't any custom field using name "Volltext", to avoid more misunderstandings, please elaborate the questions with more details.
Which custom field do you want to check, then output something with the conditional shortcode, thanks
Hi Luo,
sorry, I named the descriptive titles I used in the front end and not the names of the fields Toolset is working with.
So, at this post for example the field "Heftnummer und/oder Seitenzahl" (slug: issue) is not beeing populated with the correct value. In this case the field has no value, but the conditional shortcode is configured to display a message ("nicht verfügbar") instead. This is not working for this post, but for other posts with the same conditions.
hidden link
The other posts I mentioned with no/wrong output for the fields "Volltext → Dateianhang" and "Bibliografische Angaben" are working now. The conditional shortcode was misconfigured. I don't know why, because the first time I set it put everything was ok...
So, please investigate the issue with the wrong output for the field "Heftnummer und/oder Seitenzahl".
Thanks a lot for your efforts!
Thanks for the details, I have tried these in your website:
Edit the problem post:
hidden link
Click into field "Heftnummer und/oder Seitenzahl", press "Delete" key, save the post, test it in front-end:
hidden link
It works fine, please test again, check if it is fixed, thanks
Hi Luo,
thanks a lot for your investigation.
I can confirm that your solution is working. I tried with another post where the output of the field "Heftnummer und/oder Seitenzahl" was empty. After editing the post and just pressing delete key in the field the output on frontend is correct. Nice!!
The big question is: why is this so? What is wrong with some of these fields (not all show no output)? What is it that getting deleted?
And most important: how can I find and correct all posts concerned? There are over 1000 posts of the type "Publikation"...
Do you have any idea or solution approach?
Thanks,
Martin
I have changed the condition of conditional block "nicht verfügbar" as below:
( ( $(issue) eq '' ) )
Please test again, check if it is fixed in other posts
Hi Luo,
No, unfortunately it does not work. For example in this post the field output is still empty...
hidden link
It is actually a empty line break, and conducts problem.
I have done below modifications in your website:
1) Dashboard-> Toolset-> Settings-> Custom codes, add an item "remove-empty-lines", with below codes:
add_shortcode('remove-empty-lines', function($atts, $content){
$content = trim(do_shortcode('$content'));
return $content;
});
2) Dashboard-> Toolset-> Settings-> Front-end Content
in section "Third-party shortcode arguments", add the custom shortcode name: remove-empty-lines
3) Edit the content template
hidden link
Add a shortcode block, with below codes:
[wpv-conditional if="( '[remove-empty-lines][wpv-post-field name="wpcf-issue"][/remove-empty-lines]' eq '' )" ] nicht verfügbar [/wpv-conditional]
Please test again, check if it is fixed, thanks
More help:
hidden link
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-field
Hi Luo,
just came back from a meeting and I have only now had the opportunity to test...
Fist of all: thanks a lot for your great support!
Well it works for this post:
hidden link
But sadly not for others, for example this one:
hidden link
And I recreated the modifications on my main development site (hidden link) and it gets very unstable with blank pages (http error 500). Only after deactivating some plugins the pages will load again. Why is the server so stressed?
The posts of the type "Publikation" are coming from a Drupal installation. I migrated them with the wordpress plugin "FG Drupal to WordPress". I had a look at the original Drupal posts and, well it's just a blank field (see screenshot). I totally don't understand this problem...
Do you have any further ideas on this?
-Martin
I have change the custom codes to:
add_shortcode('remove-empty-lines', function($atts, $content){
$content = trim(do_shortcode($content));
return $content;
});
Please test again, check if it is fixed.
For other new questions:
it gets very unstable with blank pages (http error 500)
There should be some PHP errors in your website, please check if there is any PHP error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/#php-debugging
Hi Luo,
unfortunately, the adjustment did not work...
There are still posts with no output of the field "Heftnummer und/oder Seitenzahl".
For example: hidden link