demianturner / sgl-docs-tickets-migration-test

0 stars 0 forks source link

Data files for translation module for PostgreSQL #1645

Closed demianturner closed 11 years ago

demianturner commented 11 years ago

I'm working on make translation module work with PostgreSQL

I think I could have it working before next monday (June 30). I hope that you can wait for releasing 0.6.5.

I've a problem:

Where is the SGL_ROLE_TRANSLATOR (source:/modules/0.6/translation/data/navigation.php@3734#L8) inserted into DB? The role_permission cannot be inserted into db without inserting this role first.

demianturner commented 11 years ago

[ajmixto] Ok, after some review of the module data files I think that the role SGL_ROLE_TRANSLATOR and the navigation node SGL_NODE_TRANSLATOR does not work at all with a fresh installation.

I propose to remove them because they are unneeded to make the module work or to create them correctly during the installation.

demianturner commented 11 years ago

[ajmixto] I have prepared two patches:

IMHO the second one is the best because it is more clean for a simple site.

demianturner commented 11 years ago

[demian] hey AJ, i'm closing this ticket as invalid because you're effectively proposing to remove correct installation of 'translation' module for mysql users.

i'm sure it's possible to do in pg, you need to setup mysql on your machine and see how it works.

demianturner commented 11 years ago

[ajmixto] Hi Demian.

I've reopened this ticket because I think that you have misunderstood my proposal.

I've just tried to install translation module on a fresh 0.6-bugfix copy with MySQL and I've detected the same errors that I detected previously with PostgreSQL. The only different is that with MySQL there is no foreign key from role_permission to role table; so the error is not visible at all.

The error is that after install the translation module, there is one permission inserted into role_permission for the role 3, and the is a new menu section wich is only for role 3, but the role 3 is not inserted. In postgreSQL the permission is not inserted into role_permission because the foreign key does not allow insert it without inserting the role before.

So, I think you should review my second proposal, with prevent to install only things related to role number 3.

I've tested it with MySQL and every works ok for the admin role!!

demianturner commented 11 years ago

[demian] Hi AJ

Ok you were right, history is kinda complicated but at one point we had this module correctly setup to

  1. create the role
  2. create the section root node for the new role's nav
  3. create the role's nav

The result is you could login as a Translator, and see only translation stuff, not admin, which is what's needed for this module.

Anyway, I tried to recreate logic and it has too many deps so will leave this task up to the enduser. I applied your 2nd patch which clears all trace of role_id = 3 - thanks!