Language Change ? Success

User tests: Successful: Unsuccessful:

avatar twister65
twister65
10 Sep 2019

This pull request aims to export and import all the database in a package (zip file).

Summary of Changes

Add the Export / Import functionality to the System->Database view:
export_import

Testing Instructions

Apply this PR:
1- Click on Export button.
2- Select the zip file downloaded in the import box.
3- Click on Import button.

Expected result

Actual result

Documentation Changes Required

Votes

# of Users Experiencing Issue
0/1
Average Importance Score
3.00

avatar twister65 twister65 - open - 10 Sep 2019
avatar twister65 twister65 - change - 10 Sep 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 10 Sep 2019
Category Administration com_installer Language & Strings
avatar brianteeman
brianteeman - comment - 10 Sep 2019

For security purposes I would expect to see the uploaded db dump deleted from the server after it has been used. I would also expect to see some "uniqueness" in the export file name instead of just joomla_db.zip. Probably including the site name and a time stamp.

avatar twister65 twister65 - change - 10 Sep 2019
Labels Added: ? ?
avatar brianteeman
brianteeman - comment - 10 Sep 2019

Notice: Constant JPATH_ROOT already defined in C:\htdocs\joomla-cms\administrator\components\com_installer\Model\DatabaseModel.php on line 14

avatar brianteeman
brianteeman - comment - 10 Sep 2019

Windows cannot open the zip

image

avatar brianteeman
brianteeman - comment - 10 Sep 2019

Looking at the zip file I can see that it fails to open because at the top of the file before the zipped data is the markup for the html of the page

avatar wilsonge
wilsonge - comment - 10 Sep 2019

My gut is to close this as it's technically no different to the feature we rejected here #15819 (comment) - Anything you'd like to add that hasn't already been discussed there?

avatar twister65
twister65 - comment - 10 Sep 2019

This is a gui for PR #24733. This is just a draft and all comments are welcome.

It works with PostgreSQL, but there are some recent bugs when importing into the MySQL database (regardless of this PR).
I hope to do a new PR soon to solve it:
https://github.com/twister65/database/tree/fix-import

avatar twister65
twister65 - comment - 11 Sep 2019

Referring to @wilsonge comment #26248 (comment), I close this.

Note that postgresql is no longer supported by Akeeba Backup.
If someone needs to do a full backup of his site, he can use phppgadmin to dump the database and tar to archive the files.
So practical ! What good is it to be bored.

avatar twister65 twister65 - change - 11 Sep 2019
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2019-09-11 15:40:55
Closed_By twister65
avatar twister65 twister65 - close - 11 Sep 2019
avatar alikon
alikon - comment - 11 Sep 2019

@twister65 at least thanks to your work, we can use the CLI command for this...
btw i disagree with @wilsonge ..... maybe i'm the other postgresql user other than you ?

avatar twister65
twister65 - comment - 12 Sep 2019

Bug fixes for the database importer / exporter are here:
joomla-framework/database#191

avatar twister65
twister65 - comment - 22 Sep 2019

Reopened for test purposes only, at my convenience.

avatar twister65 twister65 - change - 22 Sep 2019
Status Closed New
Closed_Date 2019-09-11 15:40:55
Closed_By twister65
avatar twister65 twister65 - change - 22 Sep 2019
Status New Pending
avatar twister65 twister65 - reopen - 22 Sep 2019
avatar twister65
twister65 - comment - 22 Sep 2019

Windows cannot open the zip

@brianteeman , could you precise your system informations ?
I tested this without error on Windows 10 and wampserver.

avatar jaydevingawale jaydevingawale - test_item - 19 Oct 2019 - Tested successfully
avatar jaydevingawale
jaydevingawale - comment - 19 Oct 2019

I have tested this item successfully on 5cb9f08

I have tested this and it works successfully, even the downloaded file is also readable.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/26248.

avatar berndkohlen
berndkohlen - comment - 19 Oct 2019

I am not shure, that the result is ok
grafik

avatar twister65
twister65 - comment - 19 Oct 2019

@berndkohlen , please see my previous comment: #26248 (comment)
You also need to apply PR joomla-framework/database#191

avatar SharayuYadav SharayuYadav - test_item - 19 Oct 2019 - Tested successfully
avatar SharayuYadav
SharayuYadav - comment - 19 Oct 2019

I have tested this item successfully on ea0ba05


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/26248.

avatar ttplpoojak ttplpoojak - test_item - 19 Oct 2019 - Tested successfully
avatar ttplpoojak
ttplpoojak - comment - 19 Oct 2019

I have tested this item successfully on ea0ba05


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/26248.

avatar Neppert Neppert - test_item - 19 Oct 2019 - Tested successfully
avatar Neppert
Neppert - comment - 19 Oct 2019

I have tested this item successfully on ea0ba05

I did not fund the location of the button 'information' first and did not check the database button first, when i was importing the database again.

But technically everything was fine.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/26248.

avatar alikon alikon - change - 20 Oct 2019
Status Pending Ready to Commit
avatar alikon
alikon - comment - 20 Oct 2019

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/26248.

avatar twister65 twister65 - change - 26 Oct 2019
Labels Added: ?
avatar alikon
alikon - comment - 27 Oct 2019

tested export on another env got
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted

avatar alikon
alikon - comment - 27 Oct 2019

we can use some concept from here #15819

avatar Quy
Quy - comment - 28 Oct 2019

It exports all tables even ones not with the same table prefix. Is this the desirable behavior?

Clicking the Import button, I was expecting a modal to select a file. I did not even see the import box below the button.

avatar twister65
twister65 - comment - 29 Oct 2019

Yes, it exports the entire database. When I have time, I'll improve it:

  • Import and export only tables with the prefix used.
  • Include the import button in the import box.

Thanks for your relevant review @Quy.

avatar Quy Quy - change - 31 Oct 2019
Status Ready to Commit Pending
avatar twister65 twister65 - change - 5 Nov 2019
Labels Removed: ?
avatar twister65 twister65 - change - 6 Nov 2019
The description was changed
avatar twister65 twister65 - edited - 6 Nov 2019
avatar twister65 twister65 - change - 15 Dec 2019
The description was changed
avatar twister65 twister65 - edited - 15 Dec 2019
avatar twister65
twister65 - comment - 15 Dec 2019

@Quy, I did not find in ToolbarHelper, a modal button to select a file. So I let the import GUI in two steps:

  • Select a database zip file to import in the import box.
  • Click on the Import button.

An alert message is still present if no file has been selected.

avatar SharkyKZ
SharkyKZ - comment - 22 Dec 2019

I can't open downloaded zip. Says it's invalid. Changing its extension to tar.gz works though.

avatar twister65
twister65 - comment - 25 Dec 2019

I can't open downloaded zip. Says it's invalid. Changing its extension to tar.gz works though.

@SharkyKZ , what is your system information ? Tell me if ZIP module is enabled in phpinfo.

Tell me what this command returns with your damaged zip file:
zip -v --test joomla_db-2019-12-2XTHH-MM-SS.zip

You should have something like this:
zip_test

avatar twister65
twister65 - comment - 25 Dec 2019

@brianteeman and @SharkyKZ , I added the file size in the header and flushed system output buffer to download the zip file. Could you tell me if you have your opening error again?
I think it is expected by some browsers.

avatar brianteeman
brianteeman - comment - 27 Dec 2019

@brianteeman and @SharkyKZ , I added the file size in the header and flushed system output buffer to download the zip file. Could you tell me if you have your opening error again?

I can open the downloaded zip now

avatar Quy
Quy - comment - 28 Dec 2019

I would also expect to see some "uniqueness" in the export file name instead of just joomla_db.zip. Probably including the site name and a time stamp.

Definitely for those that manage multiple sites to prefix with the domain name or database prefix.

avatar infograf768
infograf768 - comment - 28 Dec 2019

Here on Macintosh, I can't unzip the downloaded file.
If I try to, I get
multilangsample_DB_2019-12-28T10-50-32.zip.cpgz
from a zip called
multilangsample_DB_2019-12-28T10-50-32.zip

hmm, I did not apply
joomla-framework/database#191
as I don't know how.
This may explain that.

avatar twister65
twister65 - comment - 29 Dec 2019

Here on Macintosh, I can't unzip the downloaded file.

Have you tried to export a file with another browser (with Safari or Firefox, and vice versa) ?
Let me know, and I will try to fix it with my boring Apple PowerMac G5.

Also, apply this patch joomla-framework/database#191 in your ROOT/libraries/vendor/joomla/database folder.

avatar infograf768
infograf768 - comment - 29 Dec 2019

@twister65
As i wrote above, can’t apply that patch with eclipse here.
No worry.

avatar twister65
twister65 - comment - 29 Dec 2019

@infograf768
I just synchronized joomla-framework/database#191 with the current 2.0-dev branch.
It should be fine now.

avatar Quy
Quy - comment - 2 Jan 2020

You can import a zip file that is not a backup and will get a All tables imported. which is misleading.

avatar twister65
twister65 - comment - 3 Jan 2020

You can import a zip file that is not a backup and will get a All tables imported. which is misleading.

I just have the informational message All database table structures are up to date.. It did nothing. An error message is missing.

avatar alikon
alikon - comment - 3 Jan 2020

i'm experiencing the same issue, that has been reported by @Quy previously, beside that, all good, i've successfully imported/exported from/to CLI too

avatar twister65
twister65 - comment - 4 Jan 2020

@alikon , there is no (yet) import command (CLI) in zip format.
I will add it in a new PR.

avatar twister65
twister65 - comment - 4 Jan 2020

@Quy and @alikon , check out the last commit. The analysis is light but should be sufficient to solve the last issue.
Thanks for your interest.

avatar jwaisner jwaisner - test_item - 9 Jan 2020 - Tested unsuccessfully
avatar jwaisner
jwaisner - comment - 9 Jan 2020

I have tested this item ? unsuccessfully on bfbf948

@twister65 Still getting message that "All database table structures are up to date." when importing a zip that isnt a backup as well as when you click "import" before selecting a file. The correct errors occur, but still contains the misleading message.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/26248.

avatar twister65
twister65 - comment - 11 Jan 2020

@jwaisner , the informational message "All database table structures are up to date." occurs when the system database view is updated. Regardless of this PR, this indicates that the structure of your database is up to date after examining the SQL update scripts (to update the Joomla! core).

I am working to separate the "Update structure" view and the "Import" view with tabs in order to differentiate each functionality.

Regards (Work in progress),

avatar jwaisner jwaisner - test_item - 11 Jan 2020 - Tested successfully
avatar jwaisner
jwaisner - comment - 11 Jan 2020

I have tested this item successfully on bfbf948

@twister65 I misunderstood the expected result. After retesting the functionality works as per this PR.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/26248.

avatar twister65 twister65 - change - 11 Jan 2020
The description was changed
avatar twister65 twister65 - edited - 11 Jan 2020
avatar jwaisner
jwaisner - comment - 11 Jan 2020

@ttplpoojak @SharayuYadav @Neppert

Can one of you please retest this PR after changes were made?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/26248.

avatar alikon
alikon - comment - 19 Feb 2020

@twister65 please can you solve conflict
thanks

avatar alikon
alikon - comment - 19 Feb 2020

@twister65 thanks
i've just linked this pr to a potential GSOC 2020 student,
so the reason of my request

avatar twister65
twister65 - comment - 19 Feb 2020

@alikon , it is updated. I don't understand:

i've just linked this pr to a potential GSOC 2020 student,

The next week-end, I will test your PR #25022 with an export job plugin.
Regards.

avatar twister65 twister65 - change - 2 Mar 2020
The description was changed
avatar twister65 twister65 - edited - 2 Mar 2020
avatar alikon
alikon - comment - 4 Mar 2020

with postgresql (pdo) 11.7
installed latest 4.0-dev from github (with no sample data)
applyed the pr
exported
and imported
now check structure complain see screenshot

Screenshot from 2020-03-04 08-42-17

avatar twister65
twister65 - comment - 4 Mar 2020
avatar alikon
alikon - comment - 5 Mar 2020

i've thinked that the last composer update #26820 have fixed that
what i'm missing ?

avatar twister65
twister65 - comment - 5 Mar 2020

we need to split up what the default value is and what the column properties are.

joomla-framework/database#191 (comment)

avatar twister65
twister65 - comment - 5 Mar 2020
avatar twister65 twister65 - change - 12 Jul 2020
Labels Added: Conflicting Files
avatar yasin-96 yasin-96 - test_item - 3 Aug 2020 - Tested successfully
avatar yasin-96
yasin-96 - comment - 3 Aug 2020

I have tested this item successfully on bfbf948

Applied patch via patch tester, clicekd the export button, it downloaded the zip file and afterwards I clicekd the import button and selected the downloaded file worked without problems.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/26248.

avatar jmeintrup jmeintrup - test_item - 4 Aug 2020 - Tested successfully
avatar jmeintrup
jmeintrup - comment - 4 Aug 2020

I have tested this item successfully on bfbf948

Tested successfully with MySQL


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/26248.

avatar roland-d
roland-d - comment - 4 Aug 2020

@twister65 The com_installer.ini was cleaned up in #30162 Can you please fix the conflict?

avatar twister65 twister65 - change - 4 Aug 2020
Labels Removed: Conflicting Files
avatar twister65 twister65 - change - 8 Aug 2020
Labels Added: ?
Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 8 Aug 2020
Category Administration com_installer Language & Strings Administration com_installer Language & Strings Front End Plugins
avatar twister65 twister65 - change - 8 Aug 2020
Title
[4.0] Export / Import the database in the admin form
[4.1] Export / Import the database in the admin form
avatar twister65 twister65 - edited - 8 Aug 2020
avatar twister65 twister65 - change - 21 Aug 2021
Labels Added: Language Change ?
Removed: ? ?
avatar joomla-cms-bot joomla-cms-bot - change - 21 Aug 2021
Category Administration com_installer Language & Strings Front End Plugins Administration com_installer Language & Strings
avatar twister65 twister65 - change - 21 Aug 2021
Labels Added: ?
Removed: ?
avatar twister65 twister65 - change - 21 Aug 2021
Labels Added: ?
Removed: ?
avatar twister65 twister65 - change - 1 Oct 2021
Labels Added: ?
Removed: ?
avatar bembelimen
bembelimen - comment - 20 Jan 2022

Hello,
thanks for your contribution.

As stated already, this PR is in my opinion not an improved solution to #15819 which was rejected for valid reasons. It also has the some additional challenges + e.g. missing the "time out protection". So I close this PR.

avatar bembelimen bembelimen - change - 20 Jan 2022
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2022-01-20 03:51:07
Closed_By bembelimen
avatar bembelimen bembelimen - close - 20 Jan 2022

Add a Comment

Login with GitHub to post a comment