Skip to content
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

Fix to removing article text when saving article #8

Closed
wants to merge 1 commit into from
Closed

Conversation

Ruud68
Copy link

@Ruud68 Ruud68 commented Mar 2, 2018

As I do not 'understand' why the removed lines where present this is a 'blindshot' at fixing this.
It is also possible to even further tune this to com_fields (because that is the reason why this method was added here?) by setting

if (!field->group == 'com_fields') ... continue

but that would introduce component specific code which I understand is a nogo :)

Pull Request for Issue # .

Summary of Changes

Testing Instructions

Expected result

Actual result

Documentation Changes Required

As I do not 'understand' why the removed lines where present this is a 'blindshot' at fixing this.
It is also possible to even further tune this to com_fields (because that is the reason why this method was added here?) by setting
```
if (!field->group == 'com_fields') ... continue
```
but that would introduce component specific code which I understand is a nogo :)
@laoneo
Copy link
Member

laoneo commented Mar 3, 2018

This code is the whole point of the upstream pr, to set a value for each field in the form.

@Ruud68
Copy link
Author

Ruud68 commented Mar 3, 2018

This code is the whole point of the upstream pr, to set a value for each field in the form.
But this also breaks the com_content part because there are fields thatare not on the form but that will get a value when saving the content (like the article text that is not saved in a field, but split up over intro and fulltext).

So it should be 'limited' to only add the fields for com_fields as that is what we are trying to fix.

@laoneo
Copy link
Member

laoneo commented Mar 5, 2018

As already mentioned in the upstream pr, we should avoid to add component specific code in the libraries of core. See here joomla#19753 (comment).

@laoneo
Copy link
Member

laoneo commented Mar 5, 2018

I'm closing this one.

@Ruud68
Copy link
Author

Ruud68 commented Mar 5, 2018

Agree with the avoiding of component specific code. but issue remains: when saving an article, the article content (text) get's erased.
I will be setting up a new fresh clean joomla 3.8.5 installation with the patch. Nobody is confirming the deletion of article text, but also nobody is denying. Just want to make sure it is not my setup that got 'spooked' along the way :)

@laoneo
Copy link
Member

laoneo commented Mar 5, 2018

It happened for me too. I'm on it right now. Wait with the test.

@Ruud68
Copy link
Author

Ruud68 commented Mar 5, 2018

Cool!... I mean damn :) whished it was my setup, would make it easier :)

@laoneo
Copy link
Member

laoneo commented Mar 5, 2018

See my commit here joomla@6dbed37 and the comment here joomla#19753 (comment). Going to close this one for now.

@laoneo laoneo closed this Mar 5, 2018
@Ruud68
Copy link
Author

Ruud68 commented Mar 5, 2018

Hi @laoneo , just did some test and the intro / full text is retained :)
but... now other article fields like intro image / Full Article Image, robots, etc. are erased when saving the article from the front-end...

@Ruud68 Ruud68 deleted the patch-4 branch March 23, 2018 10:19
laoneo pushed a commit that referenced this pull request Sep 26, 2018
* This is a combination of 8 commits.
This is the 1st commit message:

> First WIP version of supporting nested subforms.

This is the commit message #2:

> Fix nested subforms not getting correct name attribute on input fields.

This is the commit message #3:

> Fix subform rows having invalid index, fix small typo.

This is the commit message #4:

> Replace the unique subform id via random bytes by just an increasing integer in the fields type rendering process.

This is the commit message #5:

> Implement feedback from PR at Joomla;
> - Use a <template> HTML element for the template of the subform rows,
>   not a url encoded string inside of a <script> element.
> - Fix code style errors reported by phpcs.
> - Make the fixing of the unique attributes (name, id, etc) of input elements
>   of nested subform rows more errorprone, using the same method as the main
>   subform row.
> - Manually add a minified version of the javascript file.

This is the commit message #6:

> Fix failing javascript tests due to changed structure of subform repeatable template container.

This is the commit message #7:

> Change subform repeatable javascript test to correctly check on
> 0-indexed rows, previously they have been 1-indexed.

This is the commit message #8:

> Fix a problem where multi-level subforms on the same level doesnt trigger their template correctly.
> Additionally added a note why the fixScripts() method is broken and how it could get better.

* Commit code styling errors and add an aria label for the outermost 'add' button.

* Fix double group-add button on repeatable subform type.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants