CMSB v3.82 Released (Improved UI, Menu Count Badges, & .env support)

10 posts by 6 authors in: Forums > CMS Builder
Last Post: Tuesday at 7:06am   (RSS)

Upgraded from 3.80 to 3.82 the other day. Just reporting no problems at all :).

Hi mark99, 

Great, thanks for letting us know!  Glad it's working well.

Dave Edis - Senior Developer
interactivetools.com

I've been working extensively with the new .env file capability and have migrated all of my websites to use it for encryption keys, API keys, mail credentials, and other sensitive settings data. Everything has been running smoothly with no issues to report. 

Thanks,

Kenny H

Hi Dave

Thanks for the update. I've run into an issue. I can not log off from admin.php. When you click the link: https://domainname.co.uk/cmsb/admin.php?action=logoff, the welcome screen loads and the user stays logged in. This is an upgrade, not a new installation.

Thanks
Jeff

Jeff

BUG: When using the image tool in the TinyMCE editor, I can no longer use the media library. I get an error: invalid field. Using the traditional image upload works ok thought

Jeff Shields
yaadev.com

Hi All, 

Thanks for the feedback!

@Kenny, excellent, glad to hear the .env files are working well for you!

@JeffC, thanks for the report.  We can't recreate this locally.  Can you send me an email or support ticket and we can take a look.

@JeffS, thanks, I posted a fix for this in the other thread and we'll have it updated for the next release.

We've got some really exciting features coming in the next beta.  Appreciate all your support and feedback!

Dave Edis - Senior Developer
interactivetools.com

I can not backup all database files, I get the error (below) However I can't logout and log back in and try again as the logout link does not work (as previously stated). Is there a way to force logout so I can log back in and try it again?

Security Error: No _csrf exists in session. Try reloading or going back to previous page.

Hi Zaba

I was able to log back in after deleting my cache.

Christine @ IT helped me out. I've copied her reply to me below. My situation may not be the same as yours, so don't drop tables unless you are absolutely confident, but hopefully this will help.

It looks like the root cause of the issue resides within the site's sessions table. The "id" field is supposed to be the unique primary key of the sessions table, but in the site's database, the "id" field instead looks to be just a regular non-unique field, and an auto-incrementing "num" field is set as the primary key.

This means that every time a user clicks "Logoff", an entirely new logged-out session is being inserted into the sessions table, rather than the existing logged-in session record being updated. So the logged-in session always remains, and CMSBuilder never realizes you've actually logged out.

This happens because the query which handles this part of the logout process does so by making use of the "ON DUPLICATE KEY UPDATE" keywords, and an auto-incrementing primary key will always hold unique values, and therefore old logged-in session records will never have their keys identified as duplicate, so they will never be properly updated.

Simply dropping the sessions table entirely should trigger CMSBuilder to regenerate it with the correct fields. This can be done through phpMyAdmin in cPanel, or via the "MySQL Console" link in the Developer Console plugin in CMSBuilder.

Just to help clarify the difference in the primary key setup, in case a direct comparison is at all useful in illustrating the issue, here's approximately what the sessions table should look like:

cmsb__sessions CREATE TABLE `cmsb__sessions` (
  `id` char(64) NOT NULL,
  `expires` timestamp NOT NULL,
  `data` mediumtext,
  PRIMARY KEY (`id`),
  KEY `_auto_expires` (`expires`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC

And here's what the site's sessions table currently looks like:

CREATE TABLE `cmsb__sessions` (
  `num` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `id` char(64) NOT NULL,
  `expires` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `data` mediumtext DEFAULT NULL,
  PRIMARY KEY (`num`),
  KEY `_auto_expires` (`expires`)
) ENGINE=InnoDB AUTO_INCREMENT=1010 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC

Jeff

Thanks yes I just used a different browser and the priblem went away. Thanks for taking the time though.