CMSB v3.69 Released (Apr 29) - Website/Code Backups

9 posts by 4 authors in: Forums > CMS Builder
Last Post: May 23, 2024   (RSS)

By JeffC - April 30, 2024

Hi Dave

Are there any known issues with the Newsletter Plugin (3.07) and this latest release?

#154922 - implode(): Argument #2 ($array) must be of type ?array, string given
/home/domainhidden/public_html/cmsAdmin/lib/Fields/ListField.php on line 294
https://domainhidden.co.uk/cmsAdmin/admin.php?menu=_nlb_messages&action=add

Thanks
Jeff

Jeff

By Dave - April 30, 2024

Hi Jeff, 

Thanks for reporting that, I can confirm that issue on my end.  Can you try this fix? 

  • Open cmsb/plugins/newsletterBuilder/newsletterBuilder_cmsMenus.php
  • Search for: only set defaults for new records
  • Replace:
    $_REQUEST['send'] = 'none';​
  • With this:
    $_REQUEST['send'] = ['none'];​

Let me know if that works for you and I'll release a Newsletter Builder update as well.

Thanks!

Dave Edis - Senior Developer
interactivetools.com

By JeffC - May 1, 2024

Sorted. Thanks Dave

Jeff

By Dave - May 2, 2024

Thanks Jeff, 

I've released an updated version here if you have any other sites that need upgrading: 
https://www.interactivetools.com/plugins/newsletter-builder/

Dave Edis - Senior Developer
interactivetools.com

By ht1080z - May 15, 2024

Hi,

Always great news when you release a new version with new features!

After I upgraded and went to the Backup & Restore, I'm getting:

Warning: disk_free_space(): open_basedir restriction in effect. File(/var/www/vhosts/lagottoromagnolo.gr) is not within the allowed path(s): (/var/www/vhosts/lagottoromagnolo.gr/public_html/:/tmp/:/usr/share/pear/)formatBytes(): Argument #1 ($bytes) must be of type string|int|float|null, bool given, called in /var/www/vhosts/lagottoromagnolo.gr/public_html/cmsAdmin/lib/menus/admin/backupAndRestore.php on line 35

Note: there is no problem with free space on the server but the open_basedir restriction in effect.

How can I bypass this (if its possible)?

Thanks,
Karls

By Dave - May 15, 2024

Hi Karlz, 

Thanks for reporting that.  Here's a patch: 

  • Open /cmsb/lib/menus/admin/backupAndRestore.php
  • Search for: disk_free_space
  • Add @ before disk_free_space like this:
  • $diskSpaceFreeBytes = @disk_free_space(dirname($GLOBALS['SETTINGS']['webRootDir']));

And then check your Website Root Dir under Admin > General and make sure it ends in /public_html to match your folder structure.

Let me know if that works for you.

Dave Edis - Senior Developer
interactivetools.com

By runriot - May 17, 2024

Hey Dave,

Is there a built-in way to disable the Website/Code Backups option at a global (settings.dat.php) level? I can definitely see how it's handy for some, but with git and docker workflows, it's unnecessary and TBH, for security reasons, I don't want someone to be able to download the codebase just by having a CMS admin login.

I can remove it manually, but a built-in option would be great so I don't have to manually remove it again after any future upgrades.

Thanks

Rob

By Dave - May 23, 2024

Hi Rob, 

We can add an option to hide it, maybe in /data/settings?

Can you tell me more about your use case, though, because the Admin access grants any user a lot of options to execute PHP, shell, MySQL code.  And are you looking to just hide it aesthetically, or completely disable? 

Thanks for your feedback!

Dave Edis - Senior Developer
interactivetools.com