no message on total submissions limit reached for anonymous user when page caching is on

Created on 1 October 2019, about 5 years ago
Updated 11 May 2023, over 1 year ago

I have a site where, when total subission limits are reached, the form is correctly hidden, but related messages are missing for anonymous users.
It is strange because, at another site, I can see the module work well. Here, however, some of the many modules used might turn on caching.
By using the cacheexclude β†’ module and applying it for webforms, the expected message (the first, more verbose one) gets displayed. But then shouldn't I have got at least the else or any message before?
(And, sorry if I am ignorant here but, is there a rationale behind using the condition !$cached at Line 2229?)

webform.module @ line 2229:

  elseif ($total_limit_exceeded && !$cached) {
    if ($node->webform['total_submit_interval'] == -1 && $node->webform['total_submit_limit'] > 1) {
      $message = t('This form has received the maximum number of entries.');
    }
    else {
      $message = t('You may not submit another entry at this time.');
    }
  }
πŸ› Bug report
Status

Closed: duplicate

Version

4.0

Component

Code

Created by

πŸ‡­πŸ‡ΊHungary Joolius

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024