Osclass Support Forums

Osclass plugin support => Other => Topic started by: Alex_PY on February 09, 2023, 09:35:16 PM

Title: Admin Permissions Manager Plugin - Database import-export error after install
Post by: Alex_PY on February 09, 2023, 09:35:16 PM
Hello

During the creation of a mySQL backup from the site admin panel, the database backup is created incorrectly. And, as a result, the created mySQL backup cannot be uploaded back to the server. This cannot be done either through the admin panel or through phpMyAdmin. Video:https://youtu.be/H6E0LzUCfew

When trying to restore a site from a backup in the admin panel, the admin panel gives an error: "There was a problem importing the database"
When trying to restore a site from a backup in phpMyAdmin, we get an error:
#1824 - Failed to open the referenced table 'oc8_t_apm_permission'

We have seen that in the created file, the reference to the table goes before it is created - and, apparently, this leads to an error when trying to restore the database later - look at blue screenshot.

I ask you to resolve this issue, because at the moment the backup built into the admin panel does not work at all. As it turned out - a whole month and a half.

Sincerely, Alex.
Title: Re: Admin Permissions Manager Plugin - Database import-export error after install
Post by: MB Themes on February 10, 2023, 01:04:07 PM
Resolve issue with your backups? What?
Code: [Select]
  FOREIGN KEY (fk_i_permission_id) REFERENCES /*TABLE_PREFIX*/t_apm_permission (pk_i_id) ON DELETE CASCADE ON UPDATE CASCADE

Reference table created in step before.
Restore tables in proper order or disable foreign key checks.
Title: Re: Admin Permissions Manager Plugin - Database import-export error after install
Post by: Alex_PY on February 10, 2023, 03:10:21 PM
To be honest, I misunderstood your answer. I will ask my programmer to answer you.
Title: Re: Admin Permissions Manager Plugin - Database import-export error after install
Post by: MB Themes on February 10, 2023, 03:32:13 PM
You do not need to, if you create backup script, you are one that will create it correctly and handle foreign keys in it, or disable foreign key checks at all, or recreate tables in correct order.
Title: Re: Admin Permissions Manager Plugin - Database import-export error after install
Post by: Alex_PY on February 10, 2023, 03:44:14 PM
We do not create a backup script, but use the regular functionality. it is a regular backup that creates an incorrect file, from which it is impossible to restore the site later, due to the fact that the order of creating tables is incorrect.
Title: Re: Admin Permissions Manager Plugin - Database import-export error after install
Post by: Alex_PY on February 10, 2023, 04:00:24 PM
Video:

https://youtu.be/H6E0LzUCfew (https://youtu.be/H6E0LzUCfew)
Title: Re: Admin Permissions Manager Plugin - Database import-export error after install
Post by: MB Themes on February 10, 2023, 04:20:49 PM
Most of tables has foreign keys, you get this because it's this one just first in list, then there is another XY others.
As you told, it's feature of differnt tool not related to Osclass itself.
If you are telling that foreign keys must be dropped because your phpmyadmin cannot import tables after export, go for that...
For more support on this check support channels of this tool.
Title: Re: Admin Permissions Manager Plugin - Database import-export error after install
Post by: Alex_PY on February 10, 2023, 05:10:11 PM
Sorry, but two posts above I wrote to you that we use the standard backup tool from the admin panel. We are backing up tables with the regular backup button - but the regular restore button refuses to accept back the just made backup of tables.

One post above I showed you that it doesn't work after installing your plugin. Specially recorded video.

All plugins are purchased from you. All updated to the latest version. After installing Admin Permissions Manager Plugin, the regular backup does not work correctly.

We have not changed the backup code. Here is a list of all plugins - there are 20 of them. You can check the fact of their purchase on your site by API key.
Domain: mihogar.com.py

Title: Re: Admin Permissions Manager Plugin - Database import-export error after install
Post by: MB Themes on February 10, 2023, 08:14:56 PM
You need to look for more skilled DBA because what you tell is that you do not know what is foreign key and what that error actually means.
And what is most important, that it is absolutely unrelated to osclass.
Wrong forum at all.
You do not do backup in osclass.
Title: Re: Admin Permissions Manager Plugin - Database import-export error after install
Post by: Alex_PY on February 10, 2023, 10:59:52 PM
Question: what do you mean when you write that this solution works as designed. Can your backup function back up only the base tables of the cms itself without taking into account the tables of additional modules or what?
Title: Re: Admin Permissions Manager Plugin - Database import-export error after install
Post by: MB Themes on February 10, 2023, 11:11:29 PM
Backup you talking about is not function of osclass.
You should have backup functionality on hosting level.
Tables must be exported in order that will not interfere with foreign keys, or foreign key check must be disabled.
You cannot import table A that depends on table B, before table B.
Title: Re: Admin Permissions Manager Plugin - Database import-export error after install
Post by: Alex_PY on February 11, 2023, 07:15:08 AM
Excuse me, but what I show in this video is whose function?

Video:

https://youtu.be/H6E0LzUCfew (https://youtu.be/H6E0LzUCfew)
Title: Re: Admin Permissions Manager Plugin - Database import-export error after install
Post by: MB Themes on February 11, 2023, 09:19:09 AM
Its Import SQL file functionality.
You can load i.e. countries or own table from sql.
In backup file you must review how it was generated.
It backup data but does not mean that you can restore it easily.
Anyway we will look how this file is generated and let you know  ;)
Title: Re: Admin Permissions Manager Plugin - Database import-export error after install
Post by: Alex_PY on February 11, 2023, 02:21:20 PM
I have two consecutive backups of a SQL database with a range of 1 day.
From the first of them the base is still loaded.
From the second of them - the database is no longer loaded (after installing the Admin Permissions Manager Plugin).
Do you need them to understand the situation? (Screenshot)

If yes, write how to send them to you.


Title: Re: Admin Permissions Manager Plugin - Database import-export error after install
Post by: Alex_PY on February 11, 2023, 02:36:16 PM
And, here is a screenshot of my configuration. Is everything here suitable for the correct operation of your products and plugins?
Title: Re: Admin Permissions Manager Plugin - Database import-export error after install
Post by: MB Themes on February 11, 2023, 02:55:41 PM
It has nothing to do with configuration.
It's all described here:
https://stackoverflow.com/questions/52377469/failed-to-open-the-referenced-table
Title: Re: Admin Permissions Manager Plugin - Database import-export error after install
Post by: Alex_PY on February 11, 2023, 03:14:08 PM
I understand that you are showing me "why it doesn't work".

I just don't understand - "why it doesn't work from the admin panel of the purchased product", and "why should I solve this issue myself"? ;)

I ask you to check the situation, as you said.
Do you need the database dumps I mentioned earlier?
Title: Re: Admin Permissions Manager Plugin - Database import-export error after install
Post by: MB Themes on February 13, 2023, 10:25:14 AM
"why it doesn't work from the admin panel of the purchased product"
It's not related to plugin, as plugin only can ask DB to create foreign key. Not to tell export function what is order it should export tables. That's in hands of export functionality.

"why should I solve this issue myself"
Because you use open source software, including database one.