Skip Navigation

[Resolved] Content Templates not saving because of change in event calendar

This support ticket is created 2 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 20 replies, has 3 voices.

Last updated by Shane 1 year, 11 months ago.

Assisted by: Shane.

Author
Posts
#2145959
code-issue-location-2.jpg
code-issue-location.jpg
content-template.jpg
post-form.jpg

Installed Plugins:
The Events Calendar v5.8.2 issue starts in v5.5.0.1
Toolset Blocks: v1.6
Toolset Forms: v2.6.10
Toolset Types: v3.4.11

Theme: Twenty Twenty-One v1.4

WordPress: v5.8

PHP 7.4.6

---

When I create a Post Form & Content Template in Toolset and have it set to edit on a front-end page using the below post form with The Event Calendar version 5.5.0.1 or greater installed the data does not save.

Last version of The Event Calendar to work: 5.5.0
Issues start occurring when The Event Calendar version 5.5.0.1 is installed.

The issue occurred when The Event Calendar team removed a single line from the the following file:

The Event Calendar v5.5.0 vs. v5.5.0.1
/plugins/the-events-calendar/common/src/Tribe/Widget/Widget_Abstract.php:138

The Event Calendar changelog for version 5.5.0.1:
hidden link

Please see screenshots for post form and content template settings.

Post Form Used:

[credform]
<div class="container-fluid">
<div class="row">
<div class="form-group col-md-9 ml-0 mr-0">
<div class="row">
<div class="form-group col-md-6">
<label>[cred_i18n name='post_title-label']Organization Title[/cred_i18n]<span class="required">(required)</span></label>
[cred_field field='post_title' required='true' validate_text='Organization Title Required' class='form-control' output='bootstrap']
</div>
</div>
</div>

<div class="row">
<div class="col align-self-end">
[cred_field field='form_submit' output='bootstrap' value='Submit' class='btn btn-primary btn-lg']
</div>
</div>
</div>
[/credform]

I've managed to temporarily fix the issue by adding `$this->setup();` to /plugins/the-events-calendar/common/src/Tribe/Widget/Widget_Abstract.php:138

I've tested this in a clean install of WordPress with only the provided plugins installed. I'm not sure if this is a problem with Toolset expecting this event calendar widget to load or if it's a problem on the event calendar side. The issue only occurs when The Event Calendar at v5.5.0.1 or newer is installed.

Is this a known issue or do you have any assistance you can provide?

I’ve submitted this ticket to both plugin vendors.

#2146127
Screen Shot 2021-08-18 at 6.09.03 PM.png

Hi, thanks for the comprehensive report. The only known issue I'm aware of involving The Events Calendar was resolved several plugin versions ago. It was mostly unrelated to Forms and Content Templates:
https://toolset.com/errata/the-events-calendar-triggers-database-errors-on-toolset-dashboard/

I've got a similar setup now in my local environment with the same plugin versions you've mentioned. I did not add the patch you mentioned in TEC plugin code, I wanted to try to reproduce the problem. I have an Edit Post Form with similar configurations, set up to edit the native Post post type and redirect to a Page, the Form uses expert builder and contains a post title field, a submit button, and the form messages field. I've placed this edit post Form in a blank, unassigned Content Template using the Forms block, and saved the Content Template. All good so far. At the top, in the "View with:" field, I have selected the default Sample Page that is predefined in a fresh WP installation. Still no obvious problems. I am able to save changes now in my Content Template (screenshot attached showing successful AJAX requests after adding a paragraph block). No errors are shown in the wp-admin area, nor in the JavaScript inspector, nor in my PHP logs. I refresh the page and I can see the changes I made were saved as expected. Something else must be going on, or perhaps there are additional steps I need to take to see the problem you described.

When you say that changes to the Content Template are not saved, can you tell me a bit more about that?
- Your screenshot shows a Form block in the Content Template. Is that Form block saved as expected, or is it not possible to save once you add the Form block?
- Are you able to save changes in the Content Template without this Form block in place?
- Is the main Update button blocked / disabled somehow, or does the Update button function more or less as expected?
- What exactly happens to indicate a problem in the editor? Are errors shown in the Block Editor? If you refresh the page after updating I assume the edits you made in the template are no longer visible, correct? What else?
- Are there any errors logged in the JavaScript console? If so, please share them and tell me at what point they are triggered in the process.
- Are any AJAX requests failing? Please provide the request URLs that fail, and describe the failure (error code 500, empty response, etc.?)
- Are there any relevant errors in the server logs you can share?
- You mentioned the replaced setup code was in a Widgets file - do I need to create a specific widget or place a specific widget somewhere in Appearance > Widgets?

#2146807

I apologize for leaving out the most important part. The data is not saving when the form is used on the front-end of the site. The admin section is working as expected from what I've seen.

I recorded a video of setting up the issue and what the expected behavior is:
hidden link
(will be deleted once ticket is closed)

Let me know if this helps.

Thank you.

#2151605

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Richard,

As Christian is currently on vacation. I will be handling this ticket for him.

I've confirmed that your issue is replicable and escalated it to our 2nd tier supporters. Given that you've found a workaround by making a change in the Events Calendar plugin then the issue may not be on our side, however i've still escalated so that our 2nd tier team can have a look.

Thanks,
Shane

#2168355

Hello,

I wanted to follow up on our issue and see if there have been any updates?

Thank you,
- Blake

#2168365

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Richard,

Yes our second their has created an erratas page for this one below.
https://toolset.com/errata/events-calendar-update-breaks-toolset-post-forms/

It was also escalated to our development team for further checks. However the workaround in the URL above may be able to get this working for you.

Thanks,
Shane

#2170989

Shane, the workaround in the errata is one that we supplied to you. Not that it was one you provided to us.

We are trying to find the root cause and get this fixed so we don't have to keep adding code to a plugin core each time there is a new release. We are looking to the vendors to see if they can isolate the issue so we can get a fix.

#2171079

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Richard,

My apologies. I've checked on the developer ticket for this and there hasn't been any updates on it as yet.

However I will keep checking and as soon as there is an update I will let you know.

Thanks,
Shane

#2171231

This is a reply to prevent the clean up bot from closing this out.

I did a test yesterday to confirm the issue still exists with the latest version of these plugins:

The Events Calendar: 5.9.1
Toolset Types: 3.4.14
Toolset Blocks: 1.6.1
Toolset Forms: 2.6.12

The fixed noted in your message is the fix I document in my original ticket and am currently using.

---

My colleague found another set of plugin versions on our staging server where the issue does NOT occur with the latest version of the event calendar without the patch but older versions of type, blocks, and forms. I updated my testing environment and can confirm that issue starts when toolset forms goes from v2.6.9 to v2.6.10

The Events Calendar: 5.9.1
Toolset Types v3.4.14
Toolset Blocks v1.6.1
Toolset Forms v2.6.10 (version where forms on the front-end stop saving)

With version 2.6.9 of toolset forms the issue does not occur but it does on 2.6.10. The change log for 2.6.10 is a little long so I wont list them out here. I tested my form without being in expert mode which was mentioned in the change log but the issue persists. I'm stumped for why adding the line `$this->setup();` to /plugins/the-events-calendar/common/src/Tribe/Widget/Widget_Abstract.php:138 in the event calendar plugin prevents the issue from occurring.

Thank you
- Blake

#2188219

Hello,

I wanted to update this to let you know I'm still experiencing the original issue of not being able to save front-end Toolset Forms using the follow plugins at their latest versions.

Toolset Blocks: v1.6.1
Toolset Forms: v2.6.12
Toolset Types: v3.4.14
The Events Calendar: v5.9.1

Temporary solutions found:

Adding `$this->setup();` to /plugins/the-events-calendar/common/src/Tribe/Widget/Widget_Abstract.php:138

OR

Back porting Toolset Forms to v2.6.9

#2188835

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Richard,

Thank you for the update. Our development team still haven't post an update for this issue as yet.

Thank you for your continued patience with us.

#2222413

We are going on three months now with this ticket. Been over a month since your last comment that no one is looking at this. Can we get any update on this and get someone to actually look into this from your end? We are still actively trying to get this fixed by both vendors and trying to get something in as we have to keep applying patches to plugins whenever they are updated.

#2222481

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Richard,

I just took a look at the escalated thread for this and there was a patch that was released on our Erratas page some minutes ago.
https://toolset.com/errata/events-calendar-update-breaks-toolset-post-forms/

I advise that you download and install this patch and let me know if the issue still persists.

Thanks,
Shane

#2222489

Maybe you have a different view of that page than I do, but the only thing on there is the initial information we provided about the issue, and one comment almost a month ago.

I don't see any downloads to try out.

#2222493

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Richard,

The information should be there. However under the Workaround section you should see the following instructions.

Download and extract the file main.php from toolset.com/patches/main.php.zip

Then replace the existing file of the same name at plugins/cred-frontend-editor/application/controllers/

A permanent fix should be included in the next Forms release which would make the patch redundant.

Let me know if there are any issues implementing the patch.

Thanks,
Shane

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