Hi,
I added a module relation between module A and B but decided I didn't need it.
Using the desktop app to delete the module "module_relations" broke module A as it failed with
: require_once(../modules/module_relations/controllers/Module_relations.php): Failed to open stream: No such file or directory in
C:\xampp\htdocs\xxx\engine\Modules.php
on line 29
I think this comes from the desktop app modifying the show.php for "module A" and adding the line
when creating the relationship but when deleting the "module_relations" module the desktop app does not tidy up after itself and delete the above line.
Indeed if I reinstate the module relationship between A and B I find that I then get two "module B" summary panels on "module A"'s show view and of course two of the above lines.
Continuing on the tidying-up theme - the module A Id column should probably be removed from the module B table too.
Hope this helps.
Deleting "Module Relations" requires tidy-up
4 years ago
4 years ago
#1
4 years ago
#2
Yes, deleting a module relationship can have its problems.
I suggest that you create a new app with just 2 modules and create a relationship and see what code was added, and therefore needed to be deleted if you got rid of the relationship manually.
If you look at the code you can figure it out, takes a bit of time.
One thing you can do is duplicate the app and then compare the changes.
Sorry for nothing more specific to your situation.
Dan
I suggest that you create a new app with just 2 modules and create a relationship and see what code was added, and therefore needed to be deleted if you got rid of the relationship manually.
If you look at the code you can figure it out, takes a bit of time.
One thing you can do is duplicate the app and then compare the changes.
Sorry for nothing more specific to your situation.
Dan
4 years ago
#3
I tried to include the line of code that the app included, but the forum didn't display it for some reason - not sure what happened there - but it would be easy enough to track down in the desktop app as it inserted it into the existing code for module A/show.php.
There won't be a straightforward way of having a proper tidy-up function without the desktop app maintaining a list of the code / databases it has modified and that might be the preferred solution for deleting the module relation. Pointing the developer to the log file and say "you'll need to review this to undo changes made when the relationship was created".
There won't be a straightforward way of having a proper tidy-up function without the desktop app maintaining a list of the code / databases it has modified and that might be the preferred solution for deleting the module relation. Pointing the developer to the log file and say "you'll need to review this to undo changes made when the relationship was created".
4 years ago
#4
Use square brackets instead of curly braces.
4 years ago
#5
Deleting anything, here or there.
Involves tidying-up.
Never be afraid of the database and the word drop table.
Involves tidying-up.
Never be afraid of the database and the word drop table.