Add a new Database table is compiling the component, but by updating making not the tabel #960
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#960
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Steps to reproduce the issue
Make a new adminview
Add some fields to it.
Conenct it to you excisting component
Compile the component
Install the component on the excisiting one
Expected result
Was acpeting the new admin view and the database
Actual result
Menu is made, but the actualy database table not.
In the install.mysql.utf8.sql I see that the table will be made (during installation), byt in the update version it is empty. If I look in JCB by the conmponent updates, the field is for that version also empty. It looks that it is impossible to add new vies.
After I made some changes inm the admin viet in the sql tab, I recomplited the component. Now it made a new version, only i got an error: table doesn't excist.
Very stange behavoir.
Before I jump into this, and try to debug... have you watched these tutorial:
https://youtu.be/bRPJTRat158
https://youtu.be/ZxC6z701ixA
So that you can honestly say that this issues is not explained how to resolve in these tutorials?
I ask this since I also use JCB everyday and I am not seeing this issue, and I am wondering what exactly is the edge-case that is causing this, that has not been explained before.
Since Like I have said many times (in the above tutorials and many issues) JCB needs history for this automated DB code to work, and for that reason an imported component will not have this behaviour, and there is not yet at this time away around this limitation.
Exept opening many key areas and saving them manually, so to create the needed history... maybe I can list these areas.
Like for the view DB code to be added the following steps needed to be taken on an imported component or otherwise (no history) component:
To Prepare Component with No History
Add View SQL
This should always produce the SQL, and you can check this by opening the SQL Update area manually as explained in the turorials mentioned above.
Hi Llewellyn,
I wil do all test today and keep you posted.
First result when i use the steps in movie one: https://vimeo.com/schrijvers123/review/761370429/9290edae2a
Here you see no table made.
Evrystep I do is not solving the issue
I treid to build a new component. Also that one is failing.
Never saw this before. What am I doing wrong? My development has been stopped for now.
Thank you for your willingness to give more detailed demostration... I have now investicated it and it seems like we have a bug, and I will fix this ASAP.
Will push a release soon as I have it ready.
Thanks for picking it up @Llewellyn
Okay after much more tests I realize there is no bug, it simply is the problem of adding the view at the wrong moment of the component state in its history tracking.
To explain this in more details I have made yet another tutorial to try and help all who may fall in to this edge-case situation.
That since normally this will not happen... watch the tutorial :)
By the way this is one of the areas that is keeping us beck from moving to Joomla 4, since how Joomla integrade with the history component in Joomla 4 is very diffrent from Joomla 3.
If your still having more issues after watching that new tutorial, just bump this issue again with your findings...
Hi @Llewellyn
Again, thanks for your hekp.
It was indeed that the component had no history version. After following your steps it was working again.
How did I run into that problem?
What I did, I moved the production to staging with akeebabackup (something i shoulded have done before). And to be sure it should be development (for a better development cycle).
It seems that this caused a lost of the history. Although it was strange because I used Akeeback up to bring it back.
In your mmovie you also saying if I imported the package it has also no history. Is this not risky that a lot of people will run into this problem?
Possible Solution
Is it an idea to make a button that checkes everything and if nessesary fix it automaticly (or is doing it also during import)? Try to think how to solve this issue.
Other way is that if a component has no history, that somewhere will be a warning message?
Thanks for clearyfing and helping solving the issue.
@Schrijvers123 you do realize that whould there be an easy solution I would have already build it, yet the reality no simple solution exist.
Sure when you have a small system... one or two components. But most of my systems have 50+ components and thousands of fields linked to 10 or more components, and even the views are shared between components. This complex relationships cause an increase of the challange to track this... import a component into a system like this, where the field could match those of other extentions and you litrially have to save every area in the system and compile each component. Since that small "compile first" before you add the new "whatever" is where the bottleneck is found.
That small step does a huge task and is not easilly duplicated outside of the compiler. We may after the compiler refactoring circle back to this issue and be able to solve it... but the way things work now... making the tutorial and having this issue, struggling with it for days is the short answer and the only real solution.
Adding a notice and a link to the tutorials and posible this issue will be helpful. Yet if you search over the issues, you will find previous issues on the same topic and even tutorials made address this same issue over and over. Since its seems like saying and even drawing "like I did at the outset of this issue" does not help. The words used to explain and the demostrations still seem to leave out the very simple premiss of the issue.
Which as stated over and over is that the component needs history for this feature to work.
Hello @Llewellyn
I understand that something that looks simple can have great impact (someting I always facing in mu daily work). It was mor a suggestion for the Joomla 4 version. This because that should be the main focus (als it is also).
If you like I can make a small movie with the steps. But let's talk about that offline. For now I know how to solve it when I'm facing this issue.