I using the most recent versions of CGBlog (1.15.12) and CGExtensions (1.64.5) with CMSMS 2.2.10
When I edit an existing blog post and klick on "Submit", the following error appears (this does not happen when clicking on "Apply"):
However, renaming "cge_setup::create_uplaoder" to "cge_setup::create_uploader" in the file "class.cge_setup.php" just gives futher errors about using "$this"...Fatal error: Uncaught Error: Call to undefined method cge_setup::create_uplaoder() in /home/public_html/modules/CGExtensions/lib/class.cge_setup.php:143 Stack trace: #0 /home/public_html/modules/CGBlog/lib/class.cgblog_utils.php(96): cge_setup::get_uploader('', '/home/...') #1 /home/public_html/modules/CGBlog/action.admin_editarticle.php(228): cgblog_utils::handle_uploaded_image('m1_', 17, '2', Array, '') #2 /home/public_html/lib/classes/class.CMSModule.php(1403): include('/home/...') #3 /home/public_html/modules/CGExtensions/CGExtensions.module.php(609): CMSModule->DoAction('admin_editartic...', 'm1_', Array, '') #4 /home/public_html/lib/classes/class.CMSModule.php(1479): CGExtensions->DoAction('admin_editartic...', 'm1_', Array, '') #5 /home/public_html/admin/moduleinterface.php(74): CMSModule->DoActionBase('admin_editartic...', 'm1_', Array, '', Object(Smarty_CMS)) #6 {main} thrown in /home/public_html/modules/CGExtensions/lib/class.cge_setup.php on line 143
Help!Using $this when not in object context ...
Edit: It works again, if I use the coding from CGExtensions 1.63.3 for the "static public function create_uploader":
static public function create_uploader(string $prefix = '',string $destdir = '') : cge_uploader
{
$watermarker = null;
if( self::$_instance->settings->allow_watermarking ) $watermarker = $this->create_watermarker();
$mod = cge_utils::get_cge();
$obj = new cge_uploader($prefix, $destdir, $watermarker);
$obj->set_accepted_filetypes($mod->GetPreference('alloweduploadfiles'));
$obj->set_accepted_imagetypes($mod->GetPreference('imageextensions'));
$obj->set_preview($mod->GetPreference('allow_resizing',0));
$obj->set_preview_size($mod->GetPreference('resizeimage',0));
$obj->set_watermark($mod->GetPreference('allow_watermarking',0));
$obj->set_thumbnail($mod->GetPreference('allow_thumbnailing',0));
$obj->set_thumbnail_size($mod->GetPreference('thumbnailsize'));
$obj->set_delete_orig($mod->GetPreference('delete_orig_image'));
return $obj;
}


