Keyword

k2_categories table has no language field in db - Joomla 1.6 with K2 SVN 2.5(RC)

  • that library
  • that library's Avatar Topic Author
  • Offline
  • Senior Member
More
13 years 3 weeks ago #99781 by that library
I finally got upgraded (via Jupgrade) from Joomla v1.5.23 to 1.6.6, and installed the K2 SVN 2.5(RC) on the 1.6 site, which, thankfully is now acknowledged by J1.6 within the menu manager. This is a start but I'm having a strange issue that I hope someone can help me with:

 

I want to stress that the K2 content is in the j16_ database tables where it should be, I can see & access it within the admin area of the 1.6 site, but it's just not showing up on the front end at all. I think the major reason for this is because:


Each category's access column in the database j16_k2_categories is set to 0 instead of 1, when I try to change this for the parent category, I get a big db error, because:
There is no column for language, so when I try to change anything in the parent category (from which all others inherit their parameters (or any category), I get the following error:

TableK2Category: :store failedUnknown column 'language' in 'field list' SQL=UPDATE `j16_k2_categories` SET `name`='Library',`alias`='library-main',`description`=' **description went here**

',`parent`='0',`extraFieldsGroup`='1',`published`='1',`access`='1',`params`='{\"inheritFrom\":\"0\",\"theme\":\"\",\"num_leading_items\":\"2\",\"num_leading_columns\":\"1\",\"leadingImgSize\":\"Large\",\"num_primary_items\":\"4\",\"num_primary_columns\":\"2\",\"primaryImgSize\":\"Medium\",\"num_secondary_items\":\"4\",\"num_secondary_columns\":\"1\",\"secondaryImgSize\":\"Small\",\"num_links\":\"4\",\"num_links_columns\":\"1\",\"linksImgSize\":\"XSmall\",\"catCatalogMode\":\"0\",\"catFeaturedItems\":\"1\",\"catOrdering\":\"\",\"catPagination\":\"2\",\"catPaginationResults\":\"1\",\"catTitle\":\"1\",\"catTitleItemCounter\":\"1\",\"catDescription\":\"1\",\"catImage\":\"1\",\"catFeedLink\":\"1\",\"feedLink\":\"1\",\"subCategories\":\"1\",\"subCatColumns\":\"2\",\"subCatOrdering\":\"\",\"subCatTitle\":\"1\",\"subCatTitleItemCounter\":\"1\",\"subCatDescription\":\"1\",\"subCatImage\":\"1\",\"itemImageXS\":\"\",\"itemImageS\":\"\",\"itemImageM\":\"\",\"itemImageL\":\"\",\"itemImageXL\":\"\",\"catItemTitle\":\"1\",\"catItemTitleLinked\":\"1\",\"catItemFeaturedNotice\":\"0\",\"catItemAuthor\":\"1\",\"catItemDateCreated\":\"1\",\"catItemRating\":\"0\",\"catItemImage\":\"1\",\"catItemIntroText\":\"1\",\"catItemIntroTextWordLimit\":\"\",\"catItemExtraFields\":\"0\",\"catItemHits\":\"0\",\"catItemCategory\":\"1\",\"catItemTags\":\"1\",\"catItemAttachments\":\"0\",\"catItemAttachmentsCounter\":\"0\",\"catItemVideo\":\"0\",\"catItemVideoWidth\":\"\",\"catItemVideoHeight\":\"\",\"catItemVideoAutoPlay\":\"0\",\"catItemImageGallery\":\"0\",\"catItemDateModified\":\"0\",\"catItemReadMore\":\"1\",\"catItemCommentsAnchor\":\"1\",\"catItemK2Plugins\":\"1\",\"itemDateCreated\":\"1\",\"itemTitle\":\"1\",\"itemFeaturedNotice\":\"1\",\"itemAuthor\":\"1\",\"itemFontResizer\":\"1\",\"itemPrintButton\":\"1\",\"itemEmailButton\":\"1\",\"itemSocialButton\":\"1\",\"itemVideoAnchor\":\"1\",\"itemImageGalleryAnchor\":\"1\",\"itemCommentsAnchor\":\"1\",\"itemRating\":\"1\",\"itemImage\":\"1\",\"itemImgSize\":\"Large\",\"itemImageMainCaption\":\"1\",\"itemImageMainCredits\":\"1\",\"itemIntroText\":\"1\",\"itemFullText\":\"1\",\"itemExtraFields\":\"1\",\"itemDateModified\":\"1\",\"itemHits\":\"1\",\"itemTwitterLink\":\"1\",\"itemCategory\":\"1\",\"itemTags\":\"1\",\"itemShareLinks\":\"1\",\"itemAttachments\":\"1\",\"itemAttachmentsCounter\":\"1\",\"itemRelated\":\"1\",\"itemRelatedLimit\":\"5\",\"itemVideo\":\"1\",\"itemVideoWidth\":\"\",\"itemVideoHeight\":\"\",\"itemVideoAutoPlay\":\"0\",\"itemVideoCaption\":\"1\",\"itemVideoCredits\":\"1\",\"itemImageGallery\":\"1\",\"itemNavigation\":\"1\",\"itemComments\":\"1\",\"itemAuthorBlock\":\"1\",\"itemAuthorImage\":\"1\",\"itemAuthorDescription\":\"1\",\"itemAuthorURL\":\"1\",\"itemAuthorEmail\":\"0\",\"itemAuthorLatest\":\"1\",\"itemAuthorLatestLimit\":\"5\",\"itemK2Plugins\":\"1\"}',`language`='en-GB' WHERE id='23'


Even with the seo-friendly links turned on, J1.6 has /en/ within the links, so the language field in the k2_categories has to exist.

 

So clearly I need to add another field to not only the K2 categories, but where would it go? What I mean is where should I insert this field within that db table (in between something, at the end)? And would the items be able to be seen (retrieved properly) if it is only in the categories table after that?

Or do I need to execute a SQL query to insert it into the k2_items table as well?

 

It is worth noting that I do have a number of languages installed, but even before I installed them, all Joomla! categories & content are automatically listed as "Language - All." 

 

Can someone please help me out with this?

Bueller? Bueller?

Please Log in or Create an account to join the conversation.

  • that library
  • that library's Avatar Topic Author
  • Offline
  • Senior Member
More
13 years 3 weeks ago #99782 by that library
UPDATE: I backed up (exported) both j16_k2_categories and _items, and then executed a SQL query to change access='0' to access='1' in both tables, and YAY!!! It now shows up on the front end on one page, but not on the front page, for some odd reason I can't figure out. 

 

With that said, it seems to me that there should be a field in both tables relating to language for our international visitors, where language='*' (as it is in all the native Joomla! categories & content).

 

So my question is really where should I insert it into these tables, and does it matter where? That is, could it be the last field in both tables, as long as it is the same in both?

Please Log in or Create an account to join the conversation.

  • that library
  • that library's Avatar Topic Author
  • Offline
  • Senior Member
More
13 years 3 weeks ago #99783 by that library
UPDATE 2: I  executed 2 SQL queries for j16_k2_categories and j16_k2_items that fixed the language issue:I used a simple db SQL query that inserted this column into the K2 _categories and _items tables:  

ALTER TABLE `j16_k2_categories` ADD `language` CHAR( 7 ) NOT NULL DEFAULT 'None', ADD INDEX ( `language` )  

And then to set the value for the language column:

 UPDATE j16_k2_categories SET language='None'  

That solved the issue and I am now able to create new categories & items and edit existing ones. Yay!

I posted this on the google code page for JoomlaWorks, so I hope this gets addressed, in case -

a) it was an installation bug (SVN 2.5(RC) just didn't create the field & populate it in the db, or

b) this happens during Jupgrade for a lower version of K2 and then updating to v2.5 just doesn't create the field & populate it in those tables.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum