-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Can't swap Component (self-hosted) #4443
Comments
Hello @haruku08 and @BossMBGaming If you see that "Graphics" area in your assets section it means you are not using components v2.0 so swap action is not possible. Are you sure you migrated your instance to 2.0 and the migration script run successfully? |
@superalex we migrated to 2.0, but I'll check up on it if the components where also migrated to v2.0 |
I manually ran the migration script on the instance on my laptop, which is shown in the screenshot in my previous comment. I created a fresh project file as a test and the same context menu is shown. The instance I have on my server was tested and the issue is the same. Both have been tested with new files and previous files. I will spin up a fresh instance on my server without using the old data volumes and see if that changes anything, but I highly doubt it will. I will post an update as soon as I have done that. |
docker exec -ti {our-id} ./run.sh app.migrations.v2 exec /opt/jdk/bin/java -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager -Dlog4j2.configurationFile=log4j2.xml -XX:-OmitStackTraceInFastThrow -Dpolyglot.engine.WarnInterpreterOnly=false --enable-preview -jar penpot.jar -m app.migrations.v2 got some help and we ran the script manually and also restarted the containers, so far we didn't get lucky. |
Okay, I stand corrected, I loaded up a fresh instance, and it miraculously is working now. I guess some work may need to be done on the migration script because I would have run it as the instructions showed at help.penpot.app. Because I would have had some caching issues when I first deployed my instance of the 1.x UI still being shown which was fixed by clearing my browser cache. After which, I read the docs and noticed that there was a migration step that needed to be done. So I ran it to see if it would fix any of the issues I was having, and it hasn't/didn't. I will run the migration script again and see if that changes anything, and send an update if it has. |
Thanks a bunch, I think we look into it some more and try to update the current instance. |
One more question @haruku08 and @BossMBGaming If you create a new team, and create a file in that new team (in the existing instances), that new file has components v2 enabled? |
Ran the migration again, and I am getting the same issue. I exported one of my files, imported it in the new instance to see if that works. It does, but then all my teams and such will have to be remade and invitations sent out to members, and that's a lot of hassle. But my logs are similar to @haruku08
|
Yes, when a new team was created the component system works properly! |
Thank you very much for the information, let us check the migration script, it seems something is not working properly there |
I have one more question, can you please verify this?
Probably returns true, isn't it? |
I tried exporting and importing a previous file into the new instance, and it worked, but the items that were in the graphics area became components that didn't function 100% correctly in that the SVG fill wasn't being changed correctly. (The 'background fill' was being changed and not the stroke fill) I decided I would try moving projects files over to a new team to see if the components would work and was greeted with this message: So the issue is definitely to do with the migrations. @superalex yes the output is
|
Yes @BossMBGaming I think two things are happening:
The other issue about the background fill sounds a different thing. Could you please create another issue for that? (it would be great if you could attach info about how that background fill is rendered on before and after the migration). Thanks! |
I think the background-fill issue has to do with how I would have to do with that specific SVG I would have imported into penpot and how the SVG is formatted... I don't believe it is a penpot specific issue, but if I see a similar issue appear in using SVGs going forward, I will be sure to make an issue to report it. (The file has an 'invisible' background, to ensure the proper aspect ratio and spacing around the logo, which is what I believe was taking the fill option instead of the path of the logo.) I imported it into another program previously and had a similar issue. So I don't think it is any fault of penpot. But I will look more into it when I have some more free time. |
Ok, ok, I thought it was related to the migration from v1 to v2. If it's what you say I don't know if it's something penpot can manage properly. By the way, I've detected the problem with the migration script, I have to speak with the rest of the core team but probably tomorrow we will have a fix (and new docker images). Thank you very much for the help! :) |
Hi!, We released docker images solving this problem. You will need to do something like this: Prepare penpot to re-excute the migration
Stop penpot and update the images with something like:
Now start penpot normally, it will detect the migration isn't executed and execute it normally, you should see in the logs some info about the migration (it can take a while if you have a lot of files
|
@BossMBGaming @haruku08 could you check if this fix your issue? |
Works. Thanks a bunch guys. |
@superalex Yes, the issue seems to have been fixed. I was only able to do the update on my laptop and haven't been able to test it on my server just yet. When I do, I will be able to confirm with a higher chance of not needing to reopen this issue. But I can't test it any time soon, @haruku08 can chime in with their findings to give other feedback/confirmation. But so far, I think it would be safe to say it is fixed (with the caveat of only having one instance working so far of the original three instances that have been known to have the issue). If I have any issues when I am able to access and update my servers instance I will be sure to update you. |
Great!, thank you very much!, with the @haruku08 and yours local @BossMBGaming we have 2/3, I'm closing the issue, feel free to reopen it if you have more issues when doing it in your server :) |
Steps To Reproduce
Expected behavior
I expect that a "copy" instance is created when dragging a component asset to the canvas so I can swap the component.
Actual behavior
It's not a copy instance created, as shown in the tutorial video, instead it's create another main asset
Screenshots or video
component-swap-compressed.mp4
Desktop (please complete the following information)
No response
Smartphone (please complete the following information)
No response
Environment (please complete the following information)
No response
Frontend Stack Trace
No response
Backend Stack Trace
No response
Additional context
This problem only occurred with the self-hosted version (tested on two instances).
The text was updated successfully, but these errors were encountered: