-
Notifications
You must be signed in to change notification settings - Fork 4
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
Use defaults value for include_in_menu to avoid inconsistencies in add_update mode #66
Comments
@pathmissing Were you able to reproduce or do you need further info? |
Hi @amenk, I was able to reproduce this issue. Thank you for the detailed analysis! |
@pathmissing Do you have an estimate for the fix? |
Hi @amenk, currently I don't have an estimate for this issue because we classified it as an improvement and scheduled it for the next minor release. But if you are blocked by this we could definitely handle this as bug and up the priority. In that case I think we could fix this issue in the coming days. |
yes, please, it will block us in a few days :) |
Hi @amenk, @wagnert is working on this issue right now, a fix should be available in the coming days.
This will set a default value for the column Hope this helps :) |
Thanks for the update and the workaround. If we set this default value, existing categories are not updated, right? That would be enough of a fix for us then. I did not know about this method. So the final fix to this issue would just to put reasonable default-values which are the same like in admin I guess to make the import smoother :) |
When importing categories with a default value for |
Sure, we can talk :) For the reference I will elaborate our use case a bit: The original problem is, that we do not know from the PIM where we get the import-file from, which categories need to be visible in the shop. So we developed a task to run after the import to toggle the include_in_menu flag for all categories, based on whether they have any products or not (empty categories hidden). Now if we make an update-import we removed the We believe we cannot detect during the import if we need to show or hide a category, because we want to support also partial imports in the future and would have to look at both, the database and the import file to determine menu visibility. I believe that feature request makes sense, because the update part is already working well. Only the add part leads to some kind of data corruption because not the same values are applied as when you would create a category from the backend. |
thank you @wagnert & @pathmissing ! |
Hi @amenk This has been a significant change and I'm not sure if we can backport it to the Pacemaker Community 3.8 as there are man breaking changes. So would it be o. k. when I'll create a first 4.0.0-alpha1 for you and you proceed with the new 4.0.x branch versions. |
Ok |
All right :) This version actually is pretty still the same as the latest 3.8.x version but contains these changes besides some other minor changes. For example, we added an additional logger that logs log messages with log level > than |
* Fixed #PAC-206: Prevent finder mappings of different libraries to be overwritten * Add second log handler to log to console also * Adjust log messages to log only message with log level `notice` to console * Remove stack trace of exception for missing media directories > log a simple debug message instead
@amenk, we've release 4.0.0-alpha1 now, please give it a try :-) |
I have only specified include_in_menu in the default file and upgraded to 4.0.0-alpha1
And I am getting
might that be related / is something wrong with the defaults? |
lets follow the latest post in a new issue |
Hi @amenk, this is a issue we're already aware of, hope we can fix it within the next days :) |
Magento version: 2.3.4-p2
techdivision/import 16.5.2
We are importing categories via add_update mode.
Background
First we had the column
include_in_menu
=1
and everything went fine. Then we decided that we do not want to overwrite that flag in already existing categories and removed the column completely, believing that it defaults to 1 (like when creating a category via admin panel). When we moved from staging to live, we did a full new import and bang: all the categories where not shown.Worse than that: The category can also not be activated via admin panel any more.
Analysis
A category created via admin panel differs from the imported one in the way, that
include_in_menu
is completely missing.Is is not 0, or 1 .. it is just not there.
For the imported category it shows "included in menu = yes" in the admin panel, but in the store front it is not shown in the menu. Also setting it to no and back to yes in the admin panel does not seem to help.
Possible solution
Set all the values which are omitted as columns to the correct defaults (those Magento uses in admin panel) when creating new category entities.
The text was updated successfully, but these errors were encountered: