-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[4.0] Frontend Article submit in single language #19302
Conversation
Pr for joomla#19260 I didnt realise that the frontend didnt use the global edit layout so the code to set language to all was not present ## Steps to reproduce the issue Install J4 with Blog Sample Data Add a Menu Item Type: Create Article to the Main Menu Blog Menu with Access of Registered. Select Blog as the Category in the Options Tab for that Menu Item. Go to the frontend and login (as any UG. I did it as a Super User.) Click the new Menu Item you just created and add a Title and a bit of text if desired. Save it. ## Expected result That the article would save. ## Actual result Error: Save failed with the following error: Field 'language' doesn't have a default value and the article will not save.
I have tested this item ✅ successfully on 63e58f3 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19302. |
Looks fine here. |
@infograf768 successfully test? |
I have tested this item ✅ successfully on 63e58f3 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19302. |
I have tested this item successfully I got the error message without the patch and after that the article was successful saved. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19302. |
RTC |
@brianteeman This should be tagged for v4.0. |
Sorry I was on my phone. Corrected the milestone now |
I think we should not add this hidden field hardcode, but we should change the field type... |
Why |
If it's an fields, it's e.g. changeable via a plugin. |
I think you have completely misunderstood this pr |
Eh no? If someone has an extension for their own multilingual stuff, he/she/it has to override this line instead of creating a plugin which changes the behavior. |
@bembelimen that would be beyond the scope of this pr as they would have to change other things as well and not just this field. This pr is just fixing a bug in my original PR. (I still dont see the need for the change you requested as all they have to do is to enable the core language filter plugin and then they dont have to do anything) |
I sent you a PR which:
https://github.com/brianteeman/joomla-cms/pull/68/files Anyways, if you think, your's enough, trash my PR |
As i already said - your pr is beyond the scope of this pr AND it doesnt address all uses |
@brianteeman the PR is not nice you using a hardcoded input field that's not the Joomla way for formfields. @bembelimen PR does the same but in the correct way. |
As stated already this PR is correcting a bug in a previous larger PR. If you want to change it to the code proposed by @bembelimen (and i have no issue with it) then it will need to be changed in far more places than just the file touched in this PR so it is out of scope of this PR and the fix proposed here would not be correct as it would not be complete. |
because i simply cant be bothered i will update the pr - i trust that you will test it |
@brianteeman thx for the update i test it |
I have tested this item ✅ successfully on 1891812 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19302. |
I have tested this item 🔴 unsuccessfully on 1891812 0 Using $this when not in object context Now I very well might be doing something wrong with changing the files. I just copied the full file for FormModel.php and edit.php from the Files changed tab of github and loaded them back to their proper places in the file structure but I cannot get them to fly. Additionally, I have questions about the changes because of not hardcoding and how you @brianteeman say that it will make a ton of other stuff need to change. That scares me since I don't know what else to test to see what happens with the new file(s) to find whatever other issues will come of this. I know it's late for all of you. I couldn't get to this any earlier today and I'm always 8-9 hours behind you guys no matter what I do. Anyways, I didn't get far testing this PR. :( This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19302. |
@bayareajenn always use the patchtester component when testing and not manually editing files |
Ok. I'll do it over with patchtester. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19302. |
I can't even get patchtester to do anything in J4. I'll ask Niels to help me with it. Might be tomorrow that he gets back to me though. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19302. |
Just hit refresh :) My comment about other places is probably inaccurate. It was my mistake as everywhere else uses a layout and that's ok |
@brianteeman Oh good. I am happy that it won't create issues anywhere else. Thanks. Yes, I've refreshed. I can get nothing at all to come up in patchtester. It's ok though. It's an opportunity for me to learn more and that is never a bad thing. |
I have tested this item ✅ successfully on 1891812 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19302. |
I have tested this item ✅ successfully on 1891812 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19302. |
@bayareajenn great and thanks |
Thanks guys! |
Pr for #19260
I didnt realise that the frontend didnt use the global edit layout so the code to set language to all was not present
Steps to reproduce the issue
Expected result
That the article would save.
Actual result
Error: Save failed with the following error: Field 'language' doesn't have a default value and the article will not save.
Thanks to @bayareajenn for reporting this