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

Resource Update processor wipes missing TVs #5965

Closed
BobRay opened this issue Oct 26, 2011 · 7 comments
Closed

Resource Update processor wipes missing TVs #5965

BobRay opened this issue Oct 26, 2011 · 7 comments
Labels
bug The issue in the code or project, which should be addressed.
Milestone

Comments

@BobRay
Copy link
Contributor

BobRay commented Oct 26, 2011

bobray created Redmine issue ID 5965

I believe this code in the resource update processor will remove the values of existing TVs that are not sent in $scriptProperties['tvs']:

foreach ($tvs as $tv) {
/* set value of TV */
if ($tv->get('type') != 'checkbox') {
$value = isset($scriptProperties['tv'.$tv->get('id')]) ? $scriptProperties['tv'.$tv->get('id')] : $tv->get('default_text');
} else {
$value = isset($scriptProperties['tv'.$tv->get('id')]) ? $scriptProperties['tv'.$tv->get('id')] : '';
}

If the user sends only TVs 1 and 3, TV2 will have its value changed to ''. We could require that all TVs be sent in the argument, but it seems inefficient to make up an array containing all TVs and then process them all when a user only wants to change one or two on a page with many TVs.

@splittingred
Copy link

splittingred submitted:

The logic is there mainly to help deal with checkboxes, which don't submit their value if unchecked. This would require a large rewrite of how TV checkboxes are handled; postponing until 2.2.1 or so.

@BobRay
Copy link
Contributor Author

BobRay commented Nov 11, 2011

bobray submitted:

NewsPublisher now has a workaround for this, but it may affect other add-on components.

@modxbot
Copy link
Contributor

modxbot commented May 10, 2013

dinocorn submitted:

Bob, any pointers on the work around for NewsPublisher? I think I've ran into something similar with ImportX:
modmore/importX#48

@modxbot
Copy link
Contributor

modxbot commented May 10, 2013

dinocorn submitted:

I think I squashed the ImportX bug modmore/importX#50

@rthrash rthrash modified the milestones: Revolution-2.3.0-beta-1, Revolution-2.3.0-pl Apr 5, 2014
@opengeek opengeek modified the milestones: v2.3.1-pl, v2.3.0-pl, v2.3.2-pl Jul 17, 2014
@theboxer theboxer modified the milestones: v2.3.2-pl, v2.3.3-pl Oct 21, 2014
@theboxer theboxer closed this as completed Nov 3, 2014
@BobRay
Copy link
Contributor Author

BobRay commented Nov 3, 2014

As I read the history here, both NewsPublisher and ImportX have workarounds for this, but the bug still exists.

@sbrin
Copy link

sbrin commented Sep 3, 2016

Excuse me, If this bug is still exist why it was closed?

@OptimusCrime
Copy link
Contributor

@theboxer ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue in the code or project, which should be addressed.
Projects
None yet
Development

No branches or pull requests

8 participants