Skip Navigation

[Resolved] Warning messages about the post reference fields

This support ticket is created 2 years, 9 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/Karachi (GMT+05:00)

Author
Posts
#2080045

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.

#2080249

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

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

#2080345

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 ?

#2081267

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 ?

#2081275

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

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.

#2081467

I dont know previous reply sent or not so need to reply once again

#2082835

Did you receive my staging site credential ?

#2083085

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

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.

#2090041

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

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.

#2090301

ok

#2091207

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

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.

#2091225

meanwhile is there any tricks to hide these warnings ?

#2091371

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

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.

#2092213

Thanks please do update once the problem has been fixed

#2092247

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

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.

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