HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


[v9] Addons versioning

Login / Search

 [ Join | More ]
 Add topic 
Posted
Item has a rating of 5 (Liked by Robbie Goacher)  
Rating:
#89629 (In Topic #18178)
Avatar

Community saint

Somehow I don't think this was intended…





Last edit: by sholzy

Steve
Back to the top
 
Posted
Rating:
#89640
Avatar

Well-settled

There are 1-2 others also that I noticed that are version 1.0..
Back to the top
 
Posted
Rating:
#89652
Avatar

Community saint

curtisbrew said

There are 1-2 others also that I noticed that are version 1.0..

All the addons are showing version as 0.0. There are a few old (maybe 3rd party?) addons showing as 1.0 including the theme I installed on v7 and v8.


Last edit: by sholzy

Steve
Back to the top
 
Posted
Rating:
#89684
Avatar

Thanks. This is benign as we don't actually use these version numbers for anything (the new v9 freshness checking is done by the file time of the TAR file), but it is a bug. I'll reupload the addons with fixed version numbers.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#89895
Avatar

Community saint

Versioning is correct now, but the addons are still showing an updated version exists even though they were just installed.


Steve
Back to the top
 
Posted
Item has a rating of 5 (Liked by Guest)  
Rating:
#90024
Avatar

Should be fixed in the next release. I believe it relates to old tar files in imports/addons – we'll change the code to consider the most recent tar file for an addon to be the one installed, and hence to compare the date of that file to the date of the one on the server.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#90419
Avatar

Community saint

Chris,
 
This is the issue I incorrectly bugged in the tracker.  I shouldn't be bug checking after midnight :$

I did some more testing and it appears as if the .tar files are being saved with the timestamp the addon was added to addon downloads area here at ocPortal.com and not the timestamp the addon was last updated. I tested on a fresh install on my local Windows test server running WampServer v2.2. No old .tar files in imports/addons. Looks like newest version .tar file with older timestamp. For example, the Activity Feed addon .tar is being saved in my local server imports/addons with a timestamp of August 14 2012 19:21:02 and the addon downloads area here at ocPortal.com shows an added date of 14 August 2012. The filemtime being reported from ocPortal addon_manifest.php is August 17 2012 19:50:20 so it is always newer than the file saved on the local server and so it always displays as 'Update available' in the Addons manager in the Admin Zone.
 

I added a line of debug code to the addons.php find_updated_addons() function to echo out some variables:
 

Code


   foreach ($available_addons as $available_addon)
   {
    if ($available_addon['name']==$addon[3])
    {
     $found=true;
     echo "addon=".$addon[3]." | local addon mtime=".date ("F d Y H:i:s", $available_addon['mtime'])." | ocportal.com addon mtime=".date ("F d Y H:i:s", $addon[0])."<br>";
     if ((!is_null($addon[0])) && ($available_addon['mtime']<$addon[0])) // If known to server, and updated
     {
      $updated_addons[$addon[3]]=array($addon[1]); // Is known to server though
     }
    }
   }
 

 and here is what I got:
 

Code


 addon=Facebook Support | local addon mtime=August 14 2012 19:34:37 | ocportal.com addon mtime=August 17 2012 19:51:05
 addon=ocWorld | local addon mtime=August 14 2012 19:34:50 | ocportal.com addon mtime=August 17 2012 20:04:34
 addon=Direct Video Link Posting | local addon mtime=August 14 2012 19:21:03 | ocportal.com addon mtime=August 17 2012 19:50:59
 addon=Activity Feed | local addon mtime=August 14 2012 19:21:02 | ocportal.com addon mtime=August 17 2012 19:50:20
 addon=Amazon Affiliates | local addon mtime=August 14 2012 19:34:34 | ocportal.com addon mtime=August 17 2012 19:50:30
 addon=Amazon Wishlist | local addon mtime=August 14 2012 19:34:34 | ocportal.com addon mtime=August 17 2012 19:50:31
 addon=Gallery Carousel | local addon mtime=August 14 2012 19:34:39 | ocportal.com addon mtime=August 17 2012 19:51:06
 addon=Openid | local addon mtime=August 14 2012 19:34:38 | ocportal.com addon mtime=August 17 2012 20:14:43
 addon=Twitter Support | local addon mtime=August 14 2012 19:34:38 | ocportal.com addon mtime=August 17 2012 20:15:33
 addon=calendar | local addon mtime=August 23 2012 05:14:50 | ocportal.com addon mtime=January 01 1970 00:00:00
 addon=msn | local addon mtime=August 23 2012 05:14:50 | ocportal.com addon mtime=January 01 1970 00:00:00
 addon=ocIcon | local addon mtime=August 14 2012 19:34:39 | ocportal.com addon mtime=August 17 2012 20:03:33
 addon=realtime_rain | local addon mtime=August 23 2012 05:14:50 | ocportal.com addon mtime=January 01 1970 00:00:00
 addon=weather | local addon mtime=August 23 2012 05:14:50 | ocportal.com addon mtime=January 01 1970 00:00:00
 

 

Back to the top
 
Posted
Rating:
#90453
Avatar

Thanks!

That helped. What this actually was is that our download script uses the edit-time from the database for the time of the transferred file, yet we update these addons via FTP and that never gets updated. I've worked around this now.

Subsequent new installs will get the TAR file with the correct latest date.


This is all a bit weird as we don't version the addons at all (too much hassle, as we make so many tweaks across the whole codebase in one go, and do mass updates).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: