• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Upgrade or rewrite Module for CMSMS 2
PostPosted: Wed Jul 10, 2019 11:28 pm 
Offline
New Member
New Member

Joined: Wed Jul 10, 2019 11:20 pm
Posts: 3
Hey there,

it's been a (a very long) while, I wrote a module for a small non-profit-organisation. It ran under CMSMS 1.11.
I forgot about it, but now they upgraded to CMSMS 2 and wonder, why nothing works anymore ^-^
I didn't follow the changes around CMSMS all the years, but I want to help them by repairing the module.
Is there a way to get an overview about the necessary changes to the code?

Thanks a lot!


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Upgrade or rewrite Module for CMSMS 2
PostPosted: Wed Jul 10, 2019 11:58 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 8167
Location: Fernie British Columbia, Canada
There are several changes in the API's between CMSMS 1.11 and 2.2 (and more to come in the beta version)

Though you should be able to update your modules relatively easily with access to the error log.

The biggest changes are:
- We use multiple smarty templates, with scopes. So you cannot assume that a variable created in a module action template is available outside of that template.
- DON"T assume that $gCms is a global variable. though we do include it in scope for some things, you just can't assume that it's a global. Use cmsms() if you must.
- v2.0 removed the GetNotification... methods from the module API
- v2.0 removed a bunch of API methods that were deprecated in 1.12 or earlier. Even more stuff is deprecated now.
- v2.0 refactored the way that WYSIWYG and Syntax hilighter modules worked
- v2.0 broke admin themes.

i got this from the various threads in the announcements forum. Going as far back as the 2.0-beta1 announcement.

Note: The API documentation is reasonably up to date and lists most of the deprecated functions.

and to cover yourself for v2.3
- Make sure you aren't assuming paths to module files. Use GetModulePath() and GetModuleURLPath().
- Watch usage of $smarty->assign_by_ref()
- $this->smarty is gone out of the module api because of scopes.
- Modules that export content types cannot be lazy loaded.
- Prototypes to smarty plugins change because of newer versions of smarty.

---
if you have a specific question, just ask.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Upgrade or rewrite Module for CMSMS 2
PostPosted: Thu Jul 11, 2019 9:27 am 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Apr 23, 2008 7:53 am
Posts: 7710
Location: The Netherlands
Might help: viewforum.php?f=83

_________________
$1

Did my post help you solving a problem at your (customers) website and it saved you many hours of work? Great!! Consider buying me a cup of coffee in return!



Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Upgrade or rewrite Module for CMSMS 2
PostPosted: Thu Jul 11, 2019 9:57 am 
Offline
New Member
New Member

Joined: Thu Jul 11, 2019 9:34 am
Posts: 1
These new changes are good, I like them.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Upgrade or rewrite Module for CMSMS 2
PostPosted: Thu Jul 11, 2019 9:08 pm 
Offline
New Member
New Member

Joined: Wed Jul 10, 2019 11:20 pm
Posts: 3
Rolf \Rolf:
Might help: viewforum.php?f=83


I know the forum - it is the one, we are writing in ;-)
But I didn't find I a topic addressing my question - did I miss something?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Upgrade or rewrite Module for CMSMS 2
PostPosted: Thu Jul 11, 2019 9:17 pm 
Offline
New Member
New Member

Joined: Wed Jul 10, 2019 11:20 pm
Posts: 3
calguy1000 \calguy1000:
There are several changes in the API's between CMSMS 1.11 and 2.2 (and more to come in the beta version)

Though you should be able to update your modules relatively easily with access to the error log.

The biggest changes are:
- We use multiple smarty templates, with scopes. So you cannot assume that a variable created in a module action template is available outside of that template.
- DON"T assume that $gCms is a global variable. though we do include it in scope for some things, you just can't assume that it's a global. Use cmsms() if you must.
- v2.0 removed the GetNotification... methods from the module API
- v2.0 removed a bunch of API methods that were deprecated in 1.12 or earlier. Even more stuff is deprecated now.
- v2.0 refactored the way that WYSIWYG and Syntax hilighter modules worked
- v2.0 broke admin themes.

i got this from the various threads in the announcements forum. Going as far back as the 2.0-beta1 announcement.

Note: The API documentation is reasonably up to date and lists most of the deprecated functions.

and to cover yourself for v2.3
- Make sure you aren't assuming paths to module files. Use GetModulePath() and GetModuleURLPath().
- Watch usage of $smarty->assign_by_ref()
- $this->smarty is gone out of the module api because of scopes.
- Modules that export content types cannot be lazy loaded.
- Prototypes to smarty plugins change because of newer versions of smarty.

---
if you have a specific question, just ask.



Thanks - that is a good point to start from!


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Upgrade or rewrite Module for CMSMS 2
PostPosted: Sat Jul 13, 2019 6:31 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Apr 23, 2008 7:53 am
Posts: 7710
Location: The Netherlands
chriszeu \chriszeu:
Rolf \Rolf:
Might help: viewforum.php?f=83


I know the forum - it is the one, we are writing in ;-)
But I didn't find I a topic addressing my question - did I miss something?

No, it is not the same board as the one we are in now...
It is a developers board in the CMSMS 2.0 beta board describing code updates to get modules ready for 2.0

_________________
$1

Did my post help you solving a problem at your (customers) website and it saved you many hours of work? Great!! Consider buying me a cup of coffee in return!



Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Hosting Nation - Managed CMSMS Hosting