Home › Toolset Professional Support › [Resolved] Warning messages about the post reference fields
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/Karachi (GMT+05:00)
Tagged: Post-relationship, Setting up custom fields, Setting up custom types, Setting up post relationship, Types plugin
Related documentation:
This topic contains 16 replies, has 2 voices.
Last updated by Waqar 3 years, 5 months ago.
Assisted by: Waqar.
I am getting the following error on Editors login but not in Admin login
"The post reference field _____ could not have been displayed here. In order to set the post reference, visit the Edit Post page.
Hi,
Thank you for waiting, while I performed some tests on my website.
I can confirm that the warning message that you've reference is expected and is shown to admin and the editor user roles, alike.
When a post-relationship exists between any two post types, a relationship management section is shown on these participating post edit screens.
( example screenshot: hidden link )
This section not only allows adding a relationship connection but also offers a quick edit section that can be used to edit the custom fields of the related posts.
When adding a new relationship connection or editing the fields of the existing connection, this warning message acts as a reminder that post reference fields from the related posts can be edited from this related post's screen. To edit that particular field, you'll have to visit the actual post edit screen where this post reference field is originally added.
For example, suppose that you have a post-relationship between "Shops" and "Books" and for the "Books" post type, a post reference field has been added that references "Authors" post type.
As a result, whenever you'll be on the post edit screen for a "Shops" post and will join a new "Books" post or edit an existing one, you'll see a warning that the "Author" post reference field from the "Books" post type can't be added from this shop post edit screen. To add/edit that post reference field, you'll need to visit the actual "Books" post's edit screen.
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
yes I can understand that but why it happens only in Editor Level but not in the admin level.
is it possible to hide those notification from editors screen at least ?
I dont understand why the warning is shown only to editor roles not in admin roles
at least is it possible to hide those warnings from the editor role ?
Thanks for writing back.
I've performed some further tests and I see the same warning for the admin as well as the editor roles.
Can you please share a clone/snapshot of your website?
( ref: https://toolset.com/faq/provide-supporters-copy-site/ )
This will allow me to investigate this difference on a test server, without affecting the actual live website.
Note: I've set your next reply as private.
I dont know previous reply sent or not so need to reply once again
Did you receive my staging site credential ?
Thank you for sharing the staging website's credentials.
I'm currently performing some tests and will share an update as soon as they are completed.
Thank you for your patience.
Thank you for waiting and I apologize for the delay in getting back on this.
My support queue was unusually busy after the weekend, but I'll be able to resume my investigation on this matter today.
I'll share my findings with you within the next few hours.
ok
Thank you for waiting as this investigation turned out to be complex than I initially expected.
In my tests, the display of the warning message is not specific to any user level. It does seem to be related to which browser you're using.
There are two places that warning message is shown:
1. On the top: hidden link
2. Inline, when the quick edit option is used in the related post: hidden link
Now, in the Chrome browser, it shows on the top once, when a relationship connection is made, but in Firefox (with the same user), it keeps showing whenever the page refreshes.
I've shared these findings with the concerned team and requested some review and feedback around what should be the expected behavior.
I'll keep you updated on this ticket.
meanwhile is there any tricks to hide these warnings ?
To hide that warning from all post edit screens, you can programmatically include some custom script to the admin area pages:
function my_custom_admin_head() { ob_start(); ?> <script type="text/javascript"> jQuery( document ).ready(function() { jQuery('.notice.notice-warning:contains("could not have been displayed here. In order to set the post reference, visit the Edit Post page.")').hide(); }); </script> <?php echo ob_get_clean(); } add_action( 'admin_head', 'my_custom_admin_head' );
The above code snippet can be included through either Toolset's custom code feature ( ref: https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/ ) or through the active theme's "functions.php" file.
Thanks please do update once the problem has been fixed
I've heard back from the concerned team.
Since this is something that is happening with a very specific browser environment and steps, it is very less likely to be considered for a change, anytime soon.
For now, the workaround to hide the notification through custom code should work just fine.