Keyword

Advanced Search

Search Results (Searched for: Upgrade k2)

  • joanne
  • joanne's Avatar
21 Apr 2020 03:20 - 21 Apr 2020 04:50

View changed in admin css after version update.

Category: English K2 Community

My website's backend admin area has changed after a K2 update.
Did the css/view of the k2 backend change?

Please take a look at both screen shots below. One is before the update and other after the update

K2 new item admin section BEFORE UPDATE
prntscr.com/s2zn7g

K2 new item admin page AFTER UPDATE
prntscr.com/s2zpwp

The company that has updated my K2 version say's the K2 admin view changed with the update, and the view is now the k2 normal.
Is this the case? Did the views in the k2 admin change in the last several months between upgrades? Did I lose some custom css with the upgrade??

Thank you for the clarification.
  • JoomlaWorks
  • JoomlaWorks's Avatar
18 Apr 2020 00:06
Replied by JoomlaWorks on topic Tool for importing / exporting items to / from K2

Tool for importing / exporting items to / from K2

Category: English K2 Community

@Max If you are looking to upgrade to Joomla 3.x while keeping K2, there is no need to export your content. You can just copy the DB tables of K2, install a new Joomla 3.x site with K2, replace the new site's K2 tables with the ones from the Joomla 1.5 site and then re-install K2 (to upgrade the DB schema where necessary).
  • Clint Mallet
  • Clint Mallet's Avatar
09 Apr 2020 04:16
Unable to Select Image in Extra Field was created by Clint Mallet

Unable to Select Image in Extra Field

Category: English K2 Community

Unable to select an image for use in an image Extra Field since upgrade to K2 10.2

Error is "Error in `getFileCallback`. Cannot read property 'close' of undefined"

Details - Joomla 3.9.16, K2 2.10.2
  • JoomlaWorks
  • JoomlaWorks's Avatar
29 Mar 2020 02:01
Replied by JoomlaWorks on topic K2 Comments Not Working - Button Inactive.

K2 Comments Not Working - Button Inactive.

Category: English K2 Community

Unfortunately it's not easy to debug on my end. Some plugin is using the "Services_JSON" class, which is obviously not loaded from any file. K2 *used* to carry that file, but that was years ago and it's been removed as it was not needed for a very long time already.

Perhaps some other K2 plugin utilized that file and if you recently upgraded K2 it was probably deleted.

In any case, scan your site for any other K2 plugins. If you have a local copy, search if the string "Services_JSON" is included in any file.
  • Geraldo de Oliveira
  • Geraldo de Oliveira's Avatar
04 Mar 2020 21:24
Replied by Geraldo de Oliveira on topic K2 pagination doesn't show (hint: it's related to Falang)

K2 pagination doesn't show (hint: it's related to Falang)

Category: English K2 Community

I've tried to install the dev version but the item layout page breaks :(
Anyway, I'll wait for the stable 10.3 to upgrade. Now it's kinda of an emergency.

EDIT: Even with the fix from @Bouey it doesn't work so I've figured it out it's due to the K2 Multi Categories override located at /plugins/system/k2multiplecategories/overrides/site/components/com_k2/models/itemlist.php
I'll contact the developer once again to check this thread.

Thanks again.
  • JoomlaWorks
  • JoomlaWorks's Avatar
19 Feb 2020 09:09
Replied by JoomlaWorks on topic RSS feed 404

RSS feed 404

Category: English K2 Community

Use the dev version now: getk2.org/downloads/?f=K2_Development_Release.zip

Just remember to re-upgrade when it launches officially in the coming days. Adding last-minute changes into K2...
  • JoomlaWorks
  • JoomlaWorks's Avatar
19 Feb 2020 09:06
Replied by JoomlaWorks on topic Function broken after K2 upgrade

Function broken after K2 upgrade

Category: English K2 Community

You're welcome.
  • Michael
  • Michael's Avatar
18 Feb 2020 01:43
Replied by Michael on topic Function broken after K2 upgrade

Function broken after K2 upgrade

Category: English K2 Community

That seemed to fix my issue so far. Thanks so much!
  • JoomlaWorks
  • JoomlaWorks's Avatar
15 Feb 2020 18:38

catItemIsFeatured class not being generated after K2 upgrade

Category: English K2 Community

Just make sure to apply the change to a template override of mod_k2_content and not its core template file (as you did a couple messages above).
  • Jennie Dawson
  • Jennie Dawson's Avatar
15 Feb 2020 17:46

catItemIsFeatured class not being generated after K2 upgrade

Category: English K2 Community

Perhaps it crossed over from the Styleware module I was originally using. I don't have a record of this but I'm not as organised as you programmers!

Thanks for looking
x
  • JoomlaWorks
  • JoomlaWorks's Avatar
15 Feb 2020 14:59

catItemIsFeatured class not being generated after K2 upgrade

Category: English K2 Community

I'm pretty sure this was never in the module's override.

Check the history of the changes in the file: github.com/getk2/k2/commits/master/modules/mod_k2_content/tmpl/Default/default.php

Either way the naming pattern you mention "catItemIsFeatured" is not compatible with the classes used in the override which are prefixed with "moduleItem". If you look at all K2 templates, you'll notice a naming consistency in CSS classes and IDs.
  • JoomlaWorks
  • JoomlaWorks's Avatar
15 Feb 2020 14:51
Replied by JoomlaWorks on topic Function broken after K2 upgrade

Function broken after K2 upgrade

Category: English K2 Community

We never had such a method in K2HelperUtilities. So the file was probably modified by you or someone else at some point in the past and the upgrade simply wrote the file again, thus losing any changes.

However, there's a neater way to grab extra fields: getk2.org/documentation/tips-a-tricks/display-single-extra-fields-anywhere-in-your-k2-content
  • Jennie Dawson
  • Jennie Dawson's Avatar
15 Feb 2020 12:49

catItemIsFeatured class not being generated after K2 upgrade

Category: English K2 Community

I have fixed this now. I did a search for CatItemIsFeatured in a backup installation and found the code that now seems to have gone missing from the k2 content module template.

In case anyone else is missing this here it is.

In mod_k2_content -> Default -> default.php I changed this line in my HTML overrides:

<li class="<?php echo ($key%2) ? "odd" : "even"; if(count($items)==$key+1) echo ' lastItem'; ?>">

to:

<li class="<?php echo ($key%2) ? "odd" : "even"; if(count($items)==$key+1) echo ' lastItem'; if($item->featured) echo ' catItemIsFeatured' ?>">

Still confused as to how this went missing out of my previous overrides, I must have mixed something up somewhere. Either that or it's been missing a while and my client just didn't notice. Which does happen.

Thanks

Jennie
  • Michael
  • Michael's Avatar
14 Feb 2020 20:48
Function broken after K2 upgrade was created by Michael

Function broken after K2 upgrade

Category: English K2 Community

Hello,

I recently updated K2 from version 2.9 to version 2.10. I read in the documentation that this upgrade was safe for all template overrides, however, that does not seem to be the case for me.

After upgrading, I was hit with this error all over the site:
"Fatal error: Call to undefined method K2HelperUtilities::getFieldValue()"

I use this function to get extra fields from K2 items. Was this function changed in 2.10? Or is there another way to fix this?

Thanks!
  • Jennie Dawson
  • Jennie Dawson's Avatar
14 Feb 2020 19:45

catItemIsFeatured class not being generated after K2 upgrade

Category: English K2 Community

Sorry Fotis, I don't understand. I don't think I have written this clearly enough for you. I have possibly confused things talking about the HTML overrides as I thought they might contain out-dated code which was causing a problem. But I have now brought these up to date so it can't be this.

I am using k2 content module to display items on the home page of this site: www.dyfi-cottages.co.uk/

This generates a list of results using <li> tags, unlike the component which uses <div> tags.

Prior to the K2 upgrade, when an item was selected as 'featured' in the backend, the relevant <li> tag contained the class CatItemIsFeatured. And I have added styling to my template that uses this class.

After the upgrade it no longer contains this class. Therefore my styling has no effect. I cannot add a style if the CSS selector is missing from the HTML.

I have tried to copy the code that creates this class from the K2 component category_item.php to the li tag in my HTML override for the module

But just created PHP error, I don't know enough to do this.

Really appreciate any help you are able to give me

Best regards
Jennie
  • JoomlaWorks
  • JoomlaWorks's Avatar
14 Feb 2020 19:24

catItemIsFeatured class not being generated after K2 upgrade

Category: English K2 Community

If there was no override for it, you can simply create it now and append whatever customizations you like.
  • Jennie Dawson
  • Jennie Dawson's Avatar
14 Feb 2020 18:12 - 14 Feb 2020 18:53

catItemIsFeatured class not being generated after K2 upgrade

Category: English K2 Community

Oh, I've now managed to fix the override as I spotted what I missed. I needed to remove the labels as well. Though I do see from the new code that I no longer need to do this as your output now contains unique class for each extra field!

However I still don't have the class "CatItemIsFeatured" on the li tag, so I'm back to square 1.

I have looked at the php code for the li tag in both the old and the new default.php in mod_k2_content and it is identical. There is nothing in either of them that generates the class, but clearly it was there before somehow. I also have identical module on client's other site and that has the class on the li tag.

Thanks
Jennie
  • Jennie Dawson
  • Jennie Dawson's Avatar
14 Feb 2020 17:53

catItemIsFeatured class not being generated after K2 upgrade

Category: English K2 Community

OK so I have seen a bit of light on this and realised it probably has to do with my HTML overrides.

The whole layout of my page is contingent on styling the k2 extra fields and for this I created overrides for category_item.php in com_k2 and default.php in mod_k2_content. In the overrides I have added a little bit of code to generate the id number for each extra field as follows:

<li class="type<?php echo ucfirst($extraField->type); ?> group<?php echo $extraField->group; ?> field<?php echo $extraField->id; ?>">

I got this solution by googling it and so far have been able to replicate it, but the PHP construction has changed a bit. I have tried to add this in again to the new default.php for the module, but unfortunately it didn't work resulting in a mess. This is the new code I have tried to edit:

<li class="<?php echo ($key%2) ? "odd" : "even"; ?> type<?php echo ucfirst($extraField->type); ?> group<?php echo $extraField->group; ?> field<?php echo $extraField->id; ?> alias<?php echo ucfirst($extraField->alias); ?>">

Are you able to see where I went wrong?

Thanks Fotis, sorry to be a nuisance
Best wishes
Jennie
  • Jennie Dawson
  • Jennie Dawson's Avatar
14 Feb 2020 16:04

catItemIsFeatured class not being generated after K2 upgrade

Category: English K2 Community

Hi Fotis

I haven't modified the core K2 template files, I always override styles from my main template.css file, which always loads after any module css stylesheets.

The problem is that the class is missing from the k2 output in the first place. I don't know why.

If you look at my screenshots, the K2 item "The Lodge, Panteidal" is set as featured, but in the output the <li> tag for this item contains only the class="even" and is missing the class "CatItemIsFeatured".

Hope that makes sense!

Thanks again

Best wishes
Jennie
  • JoomlaWorks
  • JoomlaWorks's Avatar
14 Feb 2020 15:49

catItemIsFeatured class not being generated after K2 upgrade

Category: English K2 Community

You should not modify K2's core template files but instead use template overrides as described here: getk2.org/documentation/tutorials/templating-with-k2-and-the-concepts-of-sub-templates

So copy the files from K2 as indicated in the URL above and then re-do your edits. After upgrading in the future, the changes will stick.
Displaying 121 - 140 out of 2250 results.

Powered by Kunena Forum