First things first...
To install K2 for the first time or update your existing K2 based website, just grab the latest package here: https://getk2.org/downloads/?f=K2_Rolling_Release.zip
The process to update K2 is fairly simple. If you are on Joomla 1.5, grab the zip file from the link above and install it on top of your existing K2 version. If you are on Joomla 2.5 or 3.x, go to the Joomla update manager, purge the update cache, re-check and you'll see the new release available to update instantly.
So what's new with this release?
Here's a list of the most notable additions, changes or updates in K2 v2.11, organized by main topic:
- New "Selected Tags" feature in the K2 Tools. This allows you to create a hot/trending style tags menu for the frontend. For a real-world example, have a look at the "Trending" section on this site.
- New meta tags for Twitter sharing and tag/user listings.
- Added "Not specified" option in user gender option.
IMPROVEMENTS & BUG FIXES
- Full PHP 8 support. Keep in mind that outdated HTML template overrides may still cause minor issues if you switch your site to PHP 8. These are usually very easy to fix by comparing your overrides and the lines that produce errors with the default overrides in K2.
- Massive code cleanups, under-the-hood changes & fixes of various PHP notices and warnings.
- Further performance improvements in K2 URL routing.
- Automatically use the K2 menu item with the highest ID pointing to all K2 categories as fallback (root) menu item for tags, users etc. This way you'll never end up for example with "/component/k2/" prefixed URLs for tags & users.
- K2 Content: Fixed the "today" popularity filter in J3.x.
- K2 Tools: Added field togglers in J3.x. This will make navigating to the actual option used much easier when editing that module.
- K2 Tools: Improve PHP code rendeing when using it through the "custom code" option (no temp files used anymore).
- Set hidden XML option "cachemode" to "static" by default on all K2 modules, which improves cache performance in J3.x.
- Remove pre-specified cache time (in seconds) in all K2 modules.
- Added option to use a WYSIWYG or plain text editor in the profile register/edit pages.
- Extend the "robots" meta tag with "max-image-preview:large", which is utilized by Google Discover to display large image previews by default.
- Added option in the K2 Settings (component) to control Twitter sharing card layout: either use a small image with text on the right OR a large image with text at the bottom
- Improved the meta tags "description" & "keywords" used in tag & user (author blog) views. Indexed tag/user pages by Google will now produce better preview titles in Google search results.
- Enrich available data for previous/next item navigation. You can now create for example image based previous/next blocks with title & introtext below your K2 item content, instead of plain text links. See the code comments in the item.php override for more.
- Item navigation will now honor either default category ordering (by item ID) or explicit (custom) ordering (as set in each K2 category). Ordering by other factors (e.g. date, alphabetical etc.) will be added at a later update.
- Added reCaptcha/Mootools JS patch for Joomla 1.5 & 2.5.
- Better handling for deleted or non-existing tags by redirect to the site's homepage. The same applies to a tag's feed or json output and helps reduce indexing issues with search engines like Google or Bing.
- Pass raw tag name to the tag.php template (to be used with $this->name) - handy if you want to create custom headings or meta data
- In itemlist feeds (categories, tags etc.), use the "modified date" when ordering results by "latest modified" in the relevant backend settings.
- Fix typo in itemlist feeds' generated HTML inside the "description" tag and also convert multi-line "description" to single-line (helps with validation).
- Properly handle double quotes in image alt attributes for all generated feeds.
- New feature: Generated feed URLs can now be manipulated with the use of 2 query parameters (tagsontitle & taglimit) to allow rendering actual K2 item tags in each feed item's title. E.g. the URL https://www.example.com/allnews?format=feed&tagsontitle=1&taglimit=2 will enable this feature (tagsontitle=1) and include the first 2 item tags (taglimit=2) on each feed item's title. This can come extremely handy when you want to enrich your K2 feeds output, especially when using K2 feeds for auto-posting content in social media (e.g. Twitter or Facebook). For example, a tweet generated by the feed content would include these tags on its text, e.g. "K2 is awesome for social media posting #awesome #joomla" (followed by an image preview & link of course).
- Improved frontend search result display and added more content fields as "searchable" by default (e.g. the image caption field).
- Disable searching for words smaller than 3 characters (default MySQL/MariaDB limit) - filter the visible search phrase.
- Properly enforce the correct search URL route when using the relevant option in the K2 Tools' "Search" settings.
- Bring back the ID indicator in the item & category edit forms (first tab).
- Align drop-down lists to the left inside the batch processing modal.
- Show a disabled "Settings" menu when editing content in the backend (otherwise it just looks weird for admins editing content)
- Optimize file uploading in the K2 item form & allow all safe file types to be uploaded as an attachment. Also extended MIME type support to allow uploading newer file formats as attachments.
- Enforce specific index use for frontend itemlists when sorting items by dates (query optimizer hints).
- Add missing table indices on existing K2 installations upon upgrading K2. This will improve database performance for existing K2 installations.
- Rewrote some SQL queries for full MySQL 8 compatibility.
- Mark frontend & backend itemlist queries with SQL comments. This will come extremely handy when using a terminal/CLI query monitoring app like mytop or innotop to distinguish between heavy frontend (=bot crawling) or backend operations. E.g. in mytop you'll now see the queries marked like /* Backend / K2 / Items */ SELECT SQL_CALC_FOUND_ROWS... or /* Frontend / K2 / Items */ SELECT SQL_CALC_FOUND_ROWS....
- Added URL query timestamp for user avatars in the frontend - this will allow for proper cache busting when using a CDN like CloudFlare (or others) to serve images.
- Fix AllVideos rendering in the frontend for browsed media.
- Image caption & credits are now properly deleted when you delete a K2 item image.
- Fixed issue where pasted media embeds could not be removed from the K2 item form.
- When using the IAKI plugin for K2, ensure that the generated K2 image paths for Google Structured Data are absolute and not relative.
- MIME types for image galleries uploaded as zip archives have been corrected to match the extraction capabilities of the Joomla API (and its settings under the Media component).
- Improve client-side caching for K2 item pages with the proper use of "Last-Modified" and "ETag" HTTP headers for Joomla 1.5 and up to 3.x, even when server-side caching is enabled in Joomla (and you know, Joomla does its thing and does not produce the relevant HTTP headers, because... don't ask...).
- Fixed default K2 user groups not being configured upon first time installation on Joomla 2.5 & 3.x.
- Prevent duplicate tag importing (in Joomla 3.x). Meta tags and actual tags (from com_tags) are properly filtered as unique K2 tags.
- Allow YOOtheme Pro integration (code contributed by Zoolanders - thanks guys!). More info here.
- Removed reCAPTCHA v1 support (along with one PHP library dependency).
- Added option to configure theme selection for reCAPTCHA v2 in K2 Settings (component).
- K2 Media Manager: Updated elFinder to v2.1.61 - this will re-instate file uploads thorugh the K2 Media Manager on sites hosted on Plesk-based servers, as previous releases of elFinder where blocked by Plesk to address general vulnerabilities in elFinder (despite existing safety checks in K2 which further protect elFinder). Plesk would simply cut off elFinder loading simply by checking its version.
- Replaced jQueryCDN with cdnjs by CloudFlare.
If you use v2.7.x to v2.9.x already, then it is (as always) safe to upgrade to K2 v2.11. If you use a version before 2.7.0, refer to the 2.7.0 upgrade notes.
If you already have your own K2 CSS and/or HTML template overrides then there's nothing to worry about. If you use "stock" K2 CSS and HTML template overrides, just browse your site after the upgrade to make sure nothing's misalligned. In any case, exceptions may occur but they are usually easy to resolve. If you need any help, just post about your issue in the K2 Community Forum.
Since the release of K2 v2.7.0 we have added an update notification for new releases of K2 within the K2 backend (viewed only by super admins) to make it easier to spot new releases and update accordingly.
Before upgrading, it's always a good idea to get a backup of your site (just in case):
- To upgrade in Joomla 1.5, just install v2.10.0 on top of any existing K2 installation.
- To upgrade in Joomla 2.5 or 3.x, either install on top (as with Joomla 1.5) or use Joomla's extension updater (you should already see the notification for v2.10.0).
DO NOT uninstall any older K2 version first, as this will wipe out your K2 content!
HTML & CSS Template Overrides
As always, have a look here for potential updates to overrides in K2: https://getk2.org/documentation/tutorials/77-k2-template-override-package-comparison
K2 is now a rolling release
We are switching K2 to a rolling release development model.
And no "we don't use Arch BTW"...
What the hell is a rolling release development model you ask? It means more frequent *official* updates for K2. Like days apart, compared to *cough* years apart, despite K2 actually being constantly updated, cause you know... we actually use K2 on day-to-day large projects which in turn pay for the bills to keep supporting K2 for the last ~14 years...
Why the change you ask? Because we're bad at writing lengthy blog posts like this, preparing releases and the usual yada-yada. It's a tedious process to be honest for a project like K2. Instead, the rolling release option will allow us to ship changes much faster without interrupting the usual update process for end-users.
There will still be point releases, e.g. "K2 v2.11", but these will constantly be updated and marked by a build ID (which is a fancy way to timestamp software), whenever code changes are committed to the project. Point releases are practical in the sense that they can be used as a reference so you know if a given K2 release series is compatible with a given Joomla or PHP version in the future.
Since we're switching to the rolling release development model, K2 download buttons are now automatically marked with the last code commit date.
So if you're going the rolling release way, how will you document changes you ask? We'll use human-readable & easily accesible GitHub commits as our changelog in the future, so you know exactly what changes with every release. The update process will not change for you, the end-user of K2.
Of course whenever there is a large release change (e.g. the upcoming v4 to support Joomla 4), we'll let you know with a distinct announcement. As you know we always strive for backwards compatiblity (unlike *cough* Joomla), so if there are any breaking changes, we'll make sure you always know.
(v3 is jinxed by the way...)
Which bring us to the next point...
K2, Joomla 4 & beyond...
A release for Joomla 4 is long overdue, we know...
But this boils down to 2 main reasons:
- Joomla loves backwards compatibility the same way vampires love the sun. For some unknown reason, the Joomla dev team always strives for the shiny/new, nevermind if this shiny/new is something users never see or experience (=constant Joomla API renamings & changes). I'm guessing that's the main reason Joomla 4 updated its backend UI. If it was the usual API changes, Joomla users would flock en masse to other CMSs that respect backwards compatibility, fearing history would repeat itself, as when Joomla 1.6 was released (over Joomla 1.5, which were 2 totally different CMSs). As such K2 needs to be adapted for unnecessary code renamings. But that's the least work...
- Joomla 4 has a new backend UI. Yes. And pub polls indicate it's not really loved for practical reasons. It may seem fresher (or WordPress-ier?) but it's a UI thay requires more clicks to do the same tasks you did in Joomla 3. The settings are also messy. The menus are ugh... It's difficult to work with on smaller resolutions (e.g. 1440px width screens). The list goes on... But when did actual users matter for Joomla for the past decade or so? And to make matters worse, the updated Joomla 4 UI basically requires a total UI rework for any decent sized backend component like K2.
And these 2 points are probably known to the Joomla dev team, as indicated by their plans for Joomla 5 to openly focus on backwards compatibility (b/c) for the first time. Of course Joomla 5's codename ("Panta Rhei", which freely translates to "everything flowsflows") is not really inspiring on the b/c front, but let's be optimistic.
Given the above, K2 for Joomla 4 will be released as v4 and will most likely only support Joomla 4.
We'll keep the 2.x series for Joomla 1.5 - 3.x and update as long as possible to allow you for an easy upgrade path to Joomla 4 (or 5) when you decide to do that. K2's database rarely changes either way, so worse-case scenario you'll just install K2 v4 on Joomla 4+, copy over the K2 database tables from your J1.5-3.x site, move the media files and you're ready.
New features will only be added to K2 v4 and we will gradually move away from the Joomla API to a more modern implementation, which will be Joomla-backwards-compatiblity-breaking-proofTM.
For now, enjoy K2 v2.11.
It's production-ready and powering some of the highest traffic Joomla sites in the world. And this is not a pub poll ;)
* Some have said that if a nuclear war ever happened, K2 v2 and cockroaches would be the only things to survive the apocalypse.