? ? Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
5 Jan 2018

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

  1. Install J4 with Blog Sample Data
  2. Add a Menu Item Type: Create Article to the Main Menu Blog Menu with Access of Registered.
  3. Select Blog as the Category in the Options Tab for that Menu Item.
  4. Go to the frontend and login (as any UG. I did it as a Super User.)
  5. Click the new Menu Item you just created and add a Title and a bit of text if desired.
  6. 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.

Thanks to @bayareajenn for reporting this

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar brianteeman brianteeman - open - 5 Jan 2018
avatar brianteeman brianteeman - change - 5 Jan 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 Jan 2018
Category Front End com_content
avatar bayareajenn bayareajenn - test_item - 5 Jan 2018 - Tested successfully
avatar bayareajenn
bayareajenn - comment - 5 Jan 2018

I have tested this item successfully on 63e58f3

Saved successfully after applying PR. Thanks so much @brianteeman


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19302.

avatar infograf768
infograf768 - comment - 6 Jan 2018

Looks fine here.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 6 Jan 2018

@infograf768 successfully test?

avatar astridx astridx - test_item - 9 Jan 2018 - Tested successfully
avatar astridx
astridx - comment - 9 Jan 2018

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.

avatar astridx
astridx - comment - 9 Jan 2018

I have tested this item successfully
I installed J4 with Blog Sample Data and added a Menu Item Type: Create Article to the Main Menu Blog Menu with Access of Registered. I selected Blog as the Category in the Options Tab for that Menu Item.
I logged in as Super User and created a simple article.

I got the error message without the patch and after that the article was successful saved.screen shot 2018-01-09 at 00 41 12
screen shot 2018-01-09 at 00 41 22


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19302.

avatar Quy Quy - change - 9 Jan 2018
Status Pending Ready to Commit
avatar Quy
Quy - comment - 9 Jan 2018

RTC

avatar Quy
Quy - comment - 9 Jan 2018

@brianteeman This should be tagged for v4.0.

avatar brianteeman
brianteeman - comment - 9 Jan 2018

Sorry I was on my phone. Corrected the milestone now

avatar bembelimen
bembelimen - comment - 15 Jan 2018

I think we should not add this hidden field hardcode, but we should change the field type...

avatar brianteeman
brianteeman - comment - 16 Jan 2018

Why

avatar bembelimen
bembelimen - comment - 16 Jan 2018

If it's an fields, it's e.g. changeable via a plugin.

avatar brianteeman
brianteeman - comment - 16 Jan 2018

I think you have completely misunderstood this pr

avatar bembelimen
bembelimen - comment - 16 Jan 2018

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.

avatar brianteeman
brianteeman - comment - 16 Jan 2018

@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)

avatar bembelimen
bembelimen - comment - 16 Jan 2018

I sent you a PR which:

  1. uses a FormField to displaying the language field
  2. Make sure, that a user cannot manipulate the value (at the moment a user can insert any language, although it should be *)

https://github.com/brianteeman/joomla-cms/pull/68/files

Anyways, if you think, your's enough, trash my PR

avatar brianteeman
brianteeman - comment - 16 Jan 2018

As i already said - your pr is beyond the scope of this pr AND it doesnt address all uses

avatar brianteeman brianteeman - change - 16 Jan 2018
Labels Added: ?
avatar HLeithner
HLeithner - comment - 16 Jan 2018

@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.

avatar brianteeman
brianteeman - comment - 16 Jan 2018

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.

avatar brianteeman
brianteeman - comment - 16 Jan 2018

because i simply cant be bothered i will update the pr - i trust that you will test it

avatar brianteeman brianteeman - change - 16 Jan 2018
Labels Added: ?
avatar HLeithner
HLeithner - comment - 16 Jan 2018

@brianteeman thx for the update i test it

avatar HLeithner HLeithner - test_item - 16 Jan 2018 - Tested successfully
avatar HLeithner
HLeithner - comment - 16 Jan 2018

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.

avatar HLeithner
HLeithner - comment - 16 Jan 2018

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.

avatar bayareajenn
bayareajenn - comment - 16 Jan 2018

I have tested this item 🔴 unsuccessfully on 1891812

When testing on a clean install (except the file I changed for edit.php earlier in this PR) adding an article from the frontend I get an error of:

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.

avatar bayareajenn bayareajenn - test_item - 16 Jan 2018 - Tested unsuccessfully
avatar brianteeman
brianteeman - comment - 16 Jan 2018

@bayareajenn always use the patchtester component when testing and not manually editing files

avatar bayareajenn
bayareajenn - comment - 16 Jan 2018

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.

avatar bayareajenn
bayareajenn - comment - 16 Jan 2018

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.

avatar brianteeman
brianteeman - comment - 16 Jan 2018

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

avatar bayareajenn
bayareajenn - comment - 16 Jan 2018

@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.

avatar astridx astridx - test_item - 16 Jan 2018 - Tested successfully
avatar astridx
astridx - comment - 16 Jan 2018

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.

avatar bayareajenn bayareajenn - test_item - 17 Jan 2018 - Tested successfully
avatar bayareajenn
bayareajenn - comment - 17 Jan 2018

I have tested this item successfully on 1891812

Worked great when I used Patch Tester. I must have messed up yesterday. Niels helped me.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19302.

avatar brianteeman
brianteeman - comment - 17 Jan 2018

@bayareajenn great and thanks

avatar wilsonge wilsonge - change - 1 Feb 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-02-01 23:50:00
Closed_By wilsonge
avatar wilsonge wilsonge - close - 1 Feb 2018
avatar wilsonge wilsonge - merge - 1 Feb 2018
avatar wilsonge
wilsonge - comment - 1 Feb 2018

Thanks guys!

Add a Comment

Login with GitHub to post a comment