News:

Dear forum visitors, if the support forum is not available, please try again a few minutes later. Thanks!

Main Menu
Support-Forum

Migration / Install Error - SQL -> Unknown column - [Solved]

Started by Nyx, 18.11.2014 10:25:37

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Arno

Hm... denke nicht das es mit der Sprache zu tun hat. Die Tabelle in der DB ist einfach falsch aufgebaut.
Eventuell müsste man die mal manuell vor dem Importstart korrigieren... ?

Ich muss dich aber um Geduld bitten, habe heute noch mit dem content plugin zu tun und kann frühestens morgen das mit der db überprüfen.  :-\
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

Nyx

Möglich, da hast wohl du den bessern Überblick ;-)
Es war nur ein Punkt, der in dem anderem TUT so nicht vorgekommen ist, darum hab ichs ausprobiert.

Bezüglich Spalten umbenennen, habe ich ja mal in der Tabelle "kto6d_jdownloads_templates" gemacht oder sogar die ganze Tabelle vor dem data Update fü JD 3.x gelöscht.
Dann hängt er sich zwar an der Stelle mit dem nimmer auf und installiert fertig.

Nur dann kommen bei der Navigation im Admin Interface dann mehre Tabellen error,.. wie zb. in der kto6d_jdownloads_files Tabelle usw.

Wobei ich da sicher zu laienhaft ran gegangen bin.

Du wirst sicher mehr ausfinden, danke dir dafür, dann warte ich mal ;-)

Thx für deine Mühen, noch Mal.


EDIT: Hab auch auf J15 von JD 1.8.2 to JD 1.8.4 geupdatet, hat auch nix geändert.
  •  

Nyx

Eins noch ohne dir vorgreifen zu wollen:

Zusammenfassend der Fehler:
1054 Unknown column 'language' in 'field list' SQL=INSERT INTO kto6d_jdownloads_templates (template_name, ......

Stimmt ja, die Spalte language gibt es ja nicht und andere die die bei JD 3.x vorhanden sind auch nicht.

Nur komisch, dass er es über j1.5 -> j2.5 -> j3.x dann auch ohne diese von JD1.8 -> JD1.9 -> 3.X schafft.
Bzw. selbst anlegen kann.

Ich glaub ja das der Daten import von jd1.8 (joomla 1.5) -> jd1.9 (jommla 3.x oder Joomla 2.5) die Tabellen / Spalten von 1.9 zerschießt oder was falsches reinschreibt.
Und darum geht es dann von jd1.9 -> 3.x nimmer weiter.


Ich habe Heute auch noch folgendes probiert:

Man benötigt:

Einen JD 1.9 (Blanko / frische JD DB export - von Joomla 3.x)
Einen JD 1.8 eigene DATA (von joomla 1.5)

JD 1.9 auf Joomla 3.x installiert.

Nun habe ich von JD 1.9 export alle Einträge von

$database->setQuery("INSERT INTO jos_jdownloads_cats
$database->setQuery("INSERT INTO jos_jdownloads_files
$database->setQuery("INSERT INTO jos_jdownloads_rating

gelöscht und mit denen von JD 1.8 export ersetzt.


Dies in JD 1.9 importiert -> OK

Nun JD 1.9 deinstalliert.

In SQL DB:
die Tabelle SQL _jdownloads_templates gelöscht.

in der Tabelle _jdownloads_fiels folgende Spalten erstellt:
other_file_id
notes
language
access
password_md5

Dann JD 3.x installiert....

Und es geht.
Er erkentn eine alte JD DB, bietet mir die migration an.
Und führt diese auch richtig (?) durch.

Es kommen auch keine großartige Fehler außer im Frontend:

Notice: Undefined property: JObject::$list in ....\xampp\htdocs\components\com_jdownloads\views\categories\tmpl\default.php on line 151
Notice: Use of undefined constant ordering - assumed 'ordering' in ......\xampp\htdocs\components\com_jdownloads\views\categories\tmpl\default.php on line 151


Es geht alles sonst im Backend und Fronted außer ist leider das Rating durcheinander gekommen.
Das stimmt nicht richtig überein. Ist jeweils den falschen Files zugeordnet.


Nur ist das ganze nun so und so etwas sehr russisch und vermutlich ist das keine Saubere Migration wo dann mit der Zeit wo Fehler auftauchen.
Und das Rating wäre mir wichtig,...

So nun warte ich aber auf deine Ergebnisse.
  •  

ColinM

#18
Hi
Trying to learn from your experiences so I can improve the documentation.  Because of my poor German I have used Google translate, which is not very good but better than me!
My understanding is that you carried out the following steps.  Would appreciate your comments and any corrections please.



  • You exported all the jD databse entries from the jD1.8.4 series
  • Also saved a copy of the /jDownloads folder and its sub directories and files in the 1.8.4 version  
  • And similarly for the /images/jDownloads directory

  • After uninstalling jD1.8.4 you installed jD1.9.2.11 (or perhaps on a different Joomla installation)

  • overwrote/deleted the jD tables in the 1.9.2.11 jos_jdownloads_cats, jos_jdownloads_files and jos_jdownloads_rating with the corresponding 1.8.1.4 tables.
  • Deleted table jos_jdownloads_templates
  • Added extra columns to table jos_jdownloads_files, specifically other_file_id, notes, language, access and password_md5

  • At this stage the backend on jD1.9.2.11 appeared to work OK.  Obviously the frontend would not work as that needs the templates (layouts)

  • Next you saved all the jD1.9.2.11 database tables, and the /jdownloads data etc
  • Then you installed jD3.2.16 , overwrote the database tables with the ones saved from jD1.9.2.11, reload data into /jdownloads.


Result was a working system but the ratings on downloads were confused.

This last is possibly because files are referenced in the ratings by id and when the files were reloaded then different ids were allocated as the files would have been accessed in a different order.  I have not tried upgrading a system with rating tables so this might be a more general problem.

Why did you delete the Template files?
How did you set the entries in the other_file_id, notes, language, access and password_md5 columns?

Thanks
Colin

Edit:  Was auto-monitoring on when you loaded the datafiles.  If yes could you please test again with auto monitoring off.
Colin M
  •  

Nyx

Hi,

thanks for your reply.

i do:

You exported all the jD databse entries from the jD1.8.4 series
YES

Also saved a copy of the /jDownloads folder and its sub directories and files in the 1.8.4 version  
YES

And similarly for the /images/jDownloads directory
YES

After uninstalling jD1.8.4 you installed jD1.9.2.11 (or perhaps on a different Joomla installation)
YES - in this case i install a new jd 1.9.2 on Joomla 3

overwrote/deleted the jD tables in the 1.9.2.11 jos_jdownloads_cats, jos_jdownloads_files and jos_jdownloads_rating with the corresponding 1.8.1.4 tables.
YES /NO - I overwrote the jD tables jos_jdownloads_cats, jos_jdownloads_files and jos_jdownloads_rating 1.9.2 with the from 1.8.1,4 in the EXPORT txt File from JD.

Deleted table jos_jdownloads_templates
YES - I do this with Myphpadmin in the SQL DB- But i think JD 3.2.16 will install his own new one. But this was may be false.

Added extra columns to table jos_jdownloads_files, specifically other_file_id, notes, language, access and password_md5
YES - I do this, but  in the cases before when I install JD 3.2 I get the errors with this missing colums.
I do this with Myphphadmin in the SQL DB from JD 1.9.2.

At this stage the backend on jD1.9.2.11 appeared to work OK.  Obviously the frontend would not work as that needs the templates (layouts)
YES

Next you saved all the jD1.9.2.11 database tables, and the /jdownloads data etc
YES

Then you installed jD3.2.16 , overwrote the database tables with the ones saved from jD1.9.2.11, reload data into /jdownloads.
YES - And no - I only install JD 3.2.16

And yes so the system work without right rating and with template error.

I take auto-monitoring in JD 1.8.4 and JD 1.9.2 off.

I hope the rating migration will work.
I have 420 Downloads and when I correct this per Hand in the SQL DB, it will take a lot of time. and i have a long Downtime with my live migration.
  •  

ColinM

Thanks for comments - I have put below what I think is the correct sequence, with a little explanation.

Again I would appreciate your comments and any corrections please.

    The jD1.8.4 system was working on a Joomla! 1.5.x site.
    Used the jD Backup Creation facility to export all the jD database entries from the jD1.8.4 series to local PC.

    Also saved a copy of the /jDownloads folder and its sub directories and files in the 1.8.4 version.
    And similarly for the /images/jDownloads directory.

   Installed jD1.9.2.11 on a Joomla 3.x site.

    Turned off auto monitoring in jD1.9.2.11

    Used the Backup Restoration facility in jD1.9.2.11 to overwrite the jD tables in with the database tables exported from jD1.8.4,
       specifically tables jos_jdownloads_cats, jos_jdownloads_files and jos_jdownloads_rating with the corresponding 1.8.1.4 tables.

    Deleted table jos_jdownloads_templates using phpMyAdmin.

    Because jD1.8.4 does not have columns  other_file_id, notes, language, access and password_md5 in table 'jos_jdownloads_files' these columns were added with phpmyAdmin.  It was not necessary to populate these columns, it was sufficient that they were present.

    At this stage the backend on jD1.9.2.11 appeared to work OK.  Obviously the frontend would not work as that needs the templates (layouts)

    Used the Backup Creation in  jD1.9.2.11 to get updated copy of the database tables.
    Also saved again the /jDownloads directory and contents tree, and similarly /images/jdownloads content tree.

    Then you installed jD3.2.16 , overwrote the database tables with the ones saved from jD1.9.2.11, reload data into /jdownloads.

    Uninstalled jD1.9.2.11 and manually deleted jD database tables using phpMyAdmin.
    Deleted directory trees /jdownloads and /images/jdownloads.

   Installed jD3.2.16 with no data.

   Turned off auto monitoring

   Used Backup Restoration in Tools to load up database from the one saved from jD1.9.2.11

   Replaced directory trees /jdownloads and /images/jdownloads from saved versions.

All done  -Phew!!

I have modified the final part to be consistent with other documentation.  It is also where I suspect the rating tables went wrong as file ids may have changed.  Also I do not think a fresh version of jDownloads will install if tables are already in place - but maybe Arno has changed since I last tried

Colin
Colin M
  •  

Nyx

This was the way:

1.)
The jD1.8.4 (or jD 1.8.2) system was working on a Joomla! 1.5.x site.

1.1.)
Used the jD Backup Creation facility to export all the jD database entries from the jD1.8.4 series to local PC.

1.2.)
Also saved a copy of the /jDownloads folder and its sub directories and files in the 1.8.4 version.
And similarly for the /images/jDownloads directory.

2.)
Installed jD1.9.2.11 on a Joomla 3.x site.

2.1.)
Turned off auto monitoring in jD1.9.2.11

2.2.)
Used the Backup Restoration facility in jD 1.9.2.11 and make a Backup / EXPORT TXT from the new jD 1.9.2.11

3.)
I edit the jD 1.9.2.11 Backup / EXPORT TXT with:

3.1.)
To overwrite the jD tables in with the database tables exported from jD1.8.4
specifically tables jos_jdownloads_cats, jos_jdownloads_files and jos_jdownloads_rating with the corresponding 1.8.1.4 tables.

3.2.)
Search in the jD 1.9.2.11 TXT for the jos_jdownloads_config / In this example: 'jos_' is the prefix and rename "jos_" in my case to "kto6d_".

4.)
Import the "edited jD 1.9.2.11 with jD 1.8.4 data (TXT)" in jD 1.9.2.11 with the jD Restore (Wiederherstellen) funktion.

5.)
copy the /jDownloads folder and its sub directories and files of the 1.8.4 version.
And similarly for the /images/jDownloads directory.
Over the Folders (Del the 1.9.2.11 folders first).

6.)
Test HP / JD all ok

7.)
Uninstalled jD1.9.2.11 with joomla 3.

8.)
Deleted table jos_jdownloads_templates using phpMyAdmin.
This is may be false ;-)
I will create the missing culumns (?) with phpMyAdmin in the table "__jdownloads_files" next time.

8.1.)
Because jD1.8.4 does not have columns  other_file_id, notes, language, access and password_md5 in table 'jos_jdownloads_files' these columns were added with phpmyAdmin.  It was not necessary to populate these columns, it was sufficient that they were present.

9.)
Then installed jD3.2.16 -> OK

9.1)
jD 3.2.16 found "a old jD installation" i use the jD Migration assistant in the Webinterface. -> OK

9.2)
Turned off auto monitoring

9.3.)
All done  -Phew!!

9.4.)
But the rating is wrong -> may be false files ids.

9.5)
The Frontend work fine - but in the top a PHP errors with templates
e.g. "Notice: Undefined property: JObject::$list in ....\xampp\htdocs\components\com_jdownloads\views\categories\tmpl\default.php on line 151"
but may be,  if I change this (make templates columns) in the future i have no php error.
  •  

Nyx

there is already a solution for this?

What i don't understand:

Why a migration with a new JD 1.9.2 to JD 3.2 will work with out problems.
I check the Database from a live JD 1.9.2, there also no colums e.g.  other_file_id, notes in the table __jdownloads_files.

The same way with JD 1.9.2 "with JD 1.8.4 data" is a Problem by the migration to JD 3.2 with the missing colums e.g.  other_file_id, notes in the table __jdownloads_files.
  •  

Nyx

so... i try it aign WITH Templ.
-> The same Frontend error.

Quote
1.)
The jD1.8.4 (or jD 1.8.2) system was working on a Joomla! 1.5.x site.

1.1.)
Used the jD Backup Creation facility to export all the jD database entries from the jD1.8.4 series to local PC.

1.2.)
Also saved a copy of the /jDownloads folder and its sub directories and files in the 1.8.4 version.
And similarly for the /images/jDownloads directory.

2.)
Installed jD1.9.2.11 on a Joomla 3.x site.

2.1.)
Turned off auto monitoring in jD1.9.2.11

2.2.)
Used the Backup Restoration facility in jD 1.9.2.11 and make a Backup / EXPORT TXT from the new jD 1.9.2.11

3.)
I edit the jD 1.9.2.11 Backup / EXPORT TXT with:

3.1.)
To overwrite the jD tables in with the database tables exported from jD1.8.4
specifically tables jos_jdownloads_cats, jos_jdownloads_files and jos_jdownloads_rating with the corresponding 1.8.1.4 tables.

3.2.)
Search in the jD 1.9.2.11 TXT for the jos_jdownloads_config / In this example: 'jos_' is the prefix and rename "jos_" in my case to "kto6d_".

4.)
copy the /jDownloads folder and its sub directories and files of the 1.8.4 version.
And similarly for the /images/jDownloads directory.
Over the Folders (Del the 1.9.2.11 folders first).

5.)
Import the "edited jD 1.9.2.11 with jD 1.8.4 data (TXT)" in jD 1.9.2.11 with the jD Restore (Wiederherstellen) funktion.


6.)
Test HP / JD all ok

7.)
Uninstalled jD1.9.2.11 with joomla 3.

8.)
create the missing colums with phpMyAdmin in the table "__jdownloads_templates" and "__jdownloads_files".

Because jD1.8.4 and 1.9.2 does not have columns:

kto6d_jdownloads_templates:
---------------------------
template_before_text
template_after_text
language

kto6d_jdownloads_files:
----------------------
other_file_id
notes
access
password_md5

It was not necessary to populate these columns, it was sufficient that they were present.

9.)
Then installed jD3.2.16 -> OK

9.1)
jD 3.2.16 found "a old jD installation" i use the jD Migration assistant in the Webinterface. -> OK

9.2.)
All done  -Phew!!

9.3.)
But the rating is wrong -> may be false files ids.

9.4.)
The Frontend work fine (e.g.: the files data, Autor, email ,ok - also the download work) - but in the top a PHP errors:

In the "cats - Overview"(all cats):
Notice: Undefined property: JObject::$list in ...\htdocs\components\com_jdownloads\views\categories\tmpl\default.php on line 151
Notice: Use of undefined constant ordering - assumed 'ordering' in ...\htdocs\components\com_jdownloads\views\categories\tmpl\default.php on line 151

In the Single "cat - Overview":
Notice: Undefined variable: mail_encode in  ...\htdocs\components\com_jdownloads\views\category\tmpl\default.php on line 1322
Notice: Undefined variable: mail_encode in  ...\htdocs\components\com_jdownloads\views\category\tmpl\default.php on line 1322
Notice: Undefined variable: mail_encode in  ...\htdocs\components\com_jdownloads\views\category\tmpl\default.php on line 1322

In the Single "file - Overview":
Notice: Undefined property: JObject::$list in   ...\components\com_jdownloads\views\download\tmpl\default.php on line 193
Notice: Use of undefined constant ordering - assumed 'ordering' in   ...\htdocs\components\com_jdownloads\views\download\tmpl\default.php on line 193

  •  

Arno

Hi Nyx,
i will try later again here self an update like yours.
Please wait on my results.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

Nyx

  •  

Arno

Hi,
i work in this moment on the tests.
Maybe i have found the problem.

First results:
- i can restore without problems the backup file from jD 1.8.x in 1.9.2.x (Joomla 3.2.6).
 After this seems all be okay, but we have a wrong version stored in configuration table. See pic.
 The update process checked this value later and need here a value like 1.9.2.x.

... will test the rest now...


[gelöscht durch Administrator]
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

Arno

Okay. i have doing now the last part:

- we must change manually the wrong version stored in the _jdownloads_config table:
  - open your phpmyadmin and go to the _jdownloads_config table
  - search in this the field jd.version
  - change it to: 1.9.2.11
- install then the newest 3.2.x version and follow the description from the update instructions

So the only problem was the wrong version.

;D ;) :)



[gelöscht durch Administrator]
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

ColinM

Arno
Very good detective work! ;D
I will document the sequence, so to be sure I understand that  after restoring the 1.8.4 database to the 1.9 series then one manually changes the version in field jd.version of <prefix>_jdownloads_config.  That is in sequence given by Nyx it is step 5A).

I also believe that step 8 as below is NOT required
Quote8.)
create the missing colums with phpMyAdmin in the table "__jdownloads_templates" and "__jdownloads_files".

Because jD1.8.4 and 1.9.2 does not have columns:

kto6d_jdownloads_templates:
---------------------------
template_before_text
template_after_text
language

kto6d_jdownloads_files:
----------------------
other_file_id
notes
access
password_md5

It was not necessary to populate these columns, it was sufficient that they were present.

Could you please confirm both points
Thanks
Colin
Colin M
  •  

Arno

Colin,
Point 8 is not required because all tables are now correctly.  ;)
And yes, between 5 and 6 must be added the manually version correction.

Quote9.3.)
But the rating is wrong -> may be false files ids.
Hm... maybe should we correct this in a later version.  ::)

QuoteIn the "cats - Overview"(all cats):
Notice: Undefined property: JObject::$list in ...\htdocs\components\com_jdownloads\views\categories\tmpl\default.php on line 151
Notice: Use of undefined constant ordering - assumed 'ordering' in ...\htdocs\components\com_jdownloads\views\categories\tmpl\default.php on line 151

In the Single "cat - Overview":
Notice: Undefined variable: mail_encode in  ...\htdocs\components\com_jdownloads\views\category\tmpl\default.php on line 1322
Notice: Undefined variable: mail_encode in  ...\htdocs\components\com_jdownloads\views\category\tmpl\default.php on line 1322
Notice: Undefined variable: mail_encode in  ...\htdocs\components\com_jdownloads\views\category\tmpl\default.php on line 1322

In the Single "file - Overview":
Notice: Undefined property: JObject::$list in   ...\components\com_jdownloads\views\download\tmpl\default.php on line 193
Notice: Use of undefined constant ordering - assumed 'ordering' in   ...\htdocs\components\com_jdownloads\views\download\tmpl\default.php on line 193
Some are fixed in the meantime, but all users should not use a higher error levels as 'default'.
And this are NOT errors, only notices...
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •