Skip Navigation

[Resolved] Some of your settings for this page have changed, because they got copied from

This support ticket is created 3 years, 8 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)

This topic contains 10 replies, has 3 voices.

Last updated by mikeB-14 3 years, 8 months ago.

Assisted by: Waqar.

Author
Posts
#2030549

I have a custom post called planner event ,which uses a Divi conotne template

The application seem to keep losing the content template ,
So when i view a record i see just the title but not the template content.
I have goen back in and edited the template via the Divi as i have done many times over the pass year.
If i edit an edit from the admin planner list and update something that fixes it but it comes back to the same issue.
I have checked the settings for the template to make sure it's still using , but still the same problem.

I have 30 users and over 3000 planner events and I am getting more and more support call reference the the issue.

I need to get this sorted as soon as possible.

Thanks
Tony

#2030899

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Tony

Do you have a staging site available for testing?

I logged in to your site, and I found one planning event post ("128674 – Quarterly Update – Software Installation") where when viewed on the front end it wasn't displaying the expected content, although it does have the expected content template assigned.

To try and focus in on what the cause might be, it would be helpful to be able to work on a version of the site with all non-Toolset plugins disabled.

Let me set another private reply in case you are able to share credentials of such a staging site.

#2032721
#2032751

Hi Tony,

I noticed that on your website there are 3173 "Planner Events" posts and only 3 of them seem to have the "Planner Events" content template assigned to them.

If you'll go to WP Admin -> Toolset -> Content Templates -> Usage for single page (tab), you'll see a message about the binding of 3170 posts.
( screenshot: hidden link )

Have you used this bulk assignment option before? And do you recall if the template assignment is lost when any specific setting or content is changed?

In case the template's assignment issue reappears after this bulk assignment, we'll need a clone/snapshot of the actual website, where the issue can be reproduced, to investigate these reoccurrences.
( ref: https://toolset.com/faq/provide-supporters-copy-site/ )

Please let me know how it goes and I've set your next reply as private.

regards,
Waqar

#2033097

Hi Wagar

I have run the update as suggested as this showed abotu 2500 records with the issue.
This has corrected it , but I need to check a littile longoer as it appears to loose the binding.

Will let you know if it does.

Tony

#2033633

Hi Wagar

I have now checked this morning and we are back to the same issue as before.

Change Content Template

Planner Event Content Template Bind 3197 Planner Events

I think I know what may be causing this .

At 7 am and 8 pm we have a batch an "wp all import" form a csv of the planner events which , deletes the events that have been deleted and updates those that have changed and creates new ones that have been created.

This has been working for least 1 year with not issues, but this may be the problem

I am about to run the binding again and check and i will also check next run which is due to start at 7 am and see if it causes the issue.

I assume that what may be happening is the Planner Event must have a field which is the content template field , that is getting cleared every time we to the import.

Tony

#2033869

Thank you for sharing these details and the import routine would explain this.

You can use the "wpv_filter_force_template" filter to force the "Planner Event Content Template" (template ID: 35839), whenever a single "planner-event" post type page is being viewed:
https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_force_template

For example:


add_filter( 'wpv_filter_force_template', 'custom_template_override_pe', 99, 3 );
  
function custom_template_override_pe( $template_selected, $id, $kind ) {
    if ( $kind == 'single-planner-event' ) { // if it's the single planner-event post page
        $template_selected = 35839; // force template with this ID
    }
    return $template_selected;
}

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.

#2034027

Hi Wagar

Yes it is the wp that import that is clearing the content template for the planner events

Do you know which field , holds that value and if i can make a change to my import to resolve the issue ?

Thanks
Tony

#2034139

Thanks for writing back.

Some changes have been introduced recently in the content template handling, and it is now not dependant on the custom field value.

Did you get a chance to test the code that I shared, in my last message?

Assigned or not, it will make sure that the single "planner-event" posts are showing using the specified template on the front-end.

#2034587

Hi Waqar

I have applied the test the code tonight and expect the wp all import to run in the morning 7am uk time
Will let you know if all is ok.

Tony

#2034983

I'm sorry if I couldn't make this point clearer, earlier.

The code that I shared won't be affected by the import process, because it doesn't rely on whether the "Planner Event Content Template" is assigned to a particular "planner-event" post or not.

Even when you'll see that at the WP Admin -> Toolset -> Content Templates -> Usage for single page (tab), that some of the "planner-event" posts are not binding with the "Planner Event Content Template", the code will ensure that whenever "Any" single "planner-event" page is shown, it uses that "Planner Event Content Template".

#2035419

Hi Wagar

I have checked the process and added the code snippet

All is working

Thank you so much.
Tony