Kunena 6.2.5 & module Kunena Latest 6.0.7 released

The Kunena team has announce the arrival of Kunena 6.2.5 [K 6.2.5] which is now available for download as a native Joomla extension for J! 4.3.x/4.4.x/5.0.x. This version addresses most of the issues that were discovered in K 6.1 / K 6.2 and issues discovered during the last development stages of K 6.2

If you are having problems then, for your own benefit, it would save us all a lot of time if you would kindly post your configuration report when you ask for help from this forum. If you do not post your configuration report we will not ask you for it but you will probably not get your problem solved, either.

Question School Website: Adding topics (w/ attachments) via MySQL table merge.

More
9 years 7 months ago - 9 years 7 months ago #1 by DrLulz
# Preamble:

I’ve been tasked with managing the student website at my school which has been active for 3 years. Kunena is used primarily to share attachments (outlines, etc). I’m class of 2017, and there are two classes before me. The first two years (2015, 2016) were active participants on the forum, thus there are a few thousand attachments. Sometime before my class commenced the website/server pair became incompatible, I’m told, due to a php upgrade on the server. As a result my class used a Facebook group to share outlines.

Disclaimer: I'm a complete novice, so what I've done has been learned within the last few days.


# First Steps:

I began from scratch, and successfully upgraded J!2.5 to J!3.3 with subsequent migration of Kunena (thanks to these Forums). I was now left with all the documents on the Facebook group. I created a Dev account at Facebook, and using their Graph API exported a list of all the files. The list contained a URL for the file, username, message, date and time. Using grep I massaged the list into html and then used a Firefox extension to download all files.


# Preparation

Using the tables jos_kunena_topics, jos_kunena_messages, jos_kunena_messages_text and jos_kunena_attachemnts as templates I created an corresponding new excel document.


# kunena_topics

For “id” I choose an arbitrary number above the greatest number in the original and matched this with “thread” in kunena_messages.

For “category_id” I created a new category in Kunena to which all of these posts will belong.

“subject” = attachment name w/out extension
“icon_id”, “locked”, “hold”, “ordering” = 0
“posts”, “hits”, “attachments” = 1
“poll_id” = 0
“moved_id” = 1
“first_post_id” = “id” in kunena_messages (again, arbitrary yet above greatest)
“first_post_time” = unix time stamp (converted from date/time in Group Files)
“first_post_userid” = Joomla User ID
“first_post_message” = Facebook group message (a period used for posts with no messages)
“first_post_guest_name” = Joomla Username matched with Joomla User ID
“last_post_…” = same as “first_post_…”
“params” = nothing


# kunena_messages

“id” = matched with kunena_topics “first_post_id”
“parent” = 0
“thread” = matched with kunena_topics “id”
“catid” = same as kunena_topics “category_id”
“name” & “userid” = same as in kunena_topics
“email” = blank
“subject” & “time” = same as in kunena_topics
“ip” = used random ip, but the same for all entries
“topic_emoticon”, “locked”, “hold”, “ordering”, “hits”, “moved” = 0
“modified_by”, “modified_time”, “modified_reason” = NULL


# kunena_messages_text

“mesid” = kunena_messages “id” / kunena_topics “first_post_id”
“message” = kunena_topics “first_post_message”

# kunena_attachments

“id” = arbitrary number above greatest
“mesid” = kunena_messages “id”
“userid” = kunena_messages “userid”
“hash” = not sure how to generate this
“size” = left blank
“folder” = created new folder in media/kunena/attachments
“filename” = removed spaces from filenames and entered this name here


# phpMyAdmin

I then exported the excel file to csv, sanitized the the csv, and imported this into a new MySQL table. Checked the structure and merged this with the corresponding, active, table (created a backup and took the site offline).

Afterwards I ran “Recount Statistics”.


# Results

The attachments show up in the backend, but I’m assuming this is just reading the folder structure directly and is of no diagnostic value. Topics are not visible, either by search, or by viewing the category.


# Questions

1. How can I generate a HASH for the attachment filenames?
2. Instead of assigning an arbitrary number, should I use AUTO INCREMENT, and if so how do I get kunena_topics “id” & “first_post_id” to match up with kunena_messages “thread” & “id” ?


I’m doing this on a test site before I attempt it on the real site. This is how I did the original migration, so the configuration below is for the test site.


This message contains confidential information

Database collation check: z3ph6_kunena_attachments have wrong collation of type latin1_swedish_ci on field hash z3ph6_kunena_attachments have wrong collation of type latin1_swedish_ci on field folder z3ph6_kunena_attachments have wrong collation of type latin1_swedish_ci on field filetype z3ph6_kunena_attachments have wrong collation of type latin1_swedish_ci on field filename z3ph6_kunena_messages have wrong collation of type latin1_swedish_ci on field name z3ph6_kunena_messages have wrong collation of type latin1_swedish_ci on field email z3ph6_kunena_messages have wrong collation of type latin1_swedish_ci on field subject z3ph6_kunena_messages have wrong collation of type latin1_swedish_ci on field ip z3ph6_kunena_messages have wrong collation of type latin1_swedish_ci on field modified_reason z3ph6_kunena_messages_text have wrong collation of type latin1_swedish_ci on field message z3ph6_kunena_topics have wrong collation of type latin1_swedish_ci on field subject z3ph6_kunena_topics have wrong collation of type latin1_swedish_ci on field first_post_message z3ph6_kunena_topics have wrong collation of type latin1_swedish_ci on field first_post_guest_name z3ph6_kunena_topics have wrong collation of type latin1_swedish_ci on field last_post_message z3ph6_kunena_topics have wrong collation of type latin1_swedish_ci on field last_post_guest_name z3ph6_kunena_topics have wrong collation of type latin1_swedish_ci on field params

Joomla! SEF: Enabled | Joomla! SEF rewrite: Disabled | FTP layer: Disabled |

This message contains confidential information
htaccess: Exists | PHP environment: Max execution time: 30 seconds | Max execution memory: 512M | Max file upload: 128M

Kunena menu details:

Warning: Spoiler!

Joomla default template details : Tx_Zenith_II | author: ThemeXpert.com | version: 1.1 | creationdate: Unknown

Kunena default template details : Blue Eagle | author: Kunena Team | version: 3.0.6 | creationdate: 2014-07-28

Kunena version detailed: Kunena 3.0.6 | 2014-07-28 [ Tala ]
| Kunena detailed configuration:

Warning: Spoiler!
| Kunena integration settings:
Warning: Spoiler!
| Joomla! detailed language files installed:
Warning: Spoiler!

Third-party components: None

Third-party SEF components: None

Plugins: None

Modules: None

Last edit: 9 years 7 months ago by DrLulz.

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

More
9 years 7 months ago - 9 years 7 months ago #2 by DrLulz
I'm almost certain I've posted this in the wrong location.


Maybe SQL Query To Populate User_topics Table? would be a better fit. Apologies.
Last edit: 9 years 7 months ago by DrLulz.

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

More
9 years 7 months ago #3 by DrLulz
I can now see the topics on the forum, but receiving "Access Denied" when trying to access the topic.

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

More
9 years 7 months ago #4 by 810
that can be true. im if migrate stuff the categories are meesed up. so you must change all categories manually by changing permissions. then it should work.

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

More
9 years 7 months ago #5 by Matias
If you cannot access topic, it means that you haven't assigned any posts into it.

kunena_topic: most fields are generated from messages on recount. Looks ok.

kunena_attachments.hash is just md5 from the file contents.. Not really needed but useful.
kunena_attachments.size is in bytes

I would just use autoincrement for all ids, but if its hard, you can use whatever you want to as long as foreign keys are correct.

Should work in most parts, not sure what goes wrong there. Kunena 3.0 has hidden diagnostics tool in the backend to figure out some of the issues: administrator?option=com_kunena&view=diagnostics

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

Time to create page: 0.524 seconds