Download & Extend

Selecting a project does not update release options

Project:Localization server
Version:6.x-2.x-dev
Component:Export
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

If i press the project radio in "Source data" fieldset on page "translate/languages/de/export" the releases radios are not updated with the version numbers. I must press "Export" to get an error, select the version radio and press export again.

Comments

#1

Yes, this is how it works now, its not quite user friendly. I am happy to solve this when I update this module to Drupal 6, and can start to use the AHAH features there. Otherwise I welcome a fix for Drupal 5, but I am not going to work on one. (I am not much motivated to work on this, because it is expected that all package generation will be automated on drupal.org, so manual exports will only be for testing purposes, and this option will not get much use).

#2

Gabor, should we bump this to 6.x or close?

#3

Version:5.x-1.x-dev» 6.x-1.x-dev
Category:bug report» feature request

Yeah, we would be still better off with nice AHAH treatment.

#4

Status:active» needs review

ok, lets begin.

AttachmentSizeStatusTest resultOperations
l10n_project_select.patch7.89 KBIdleFAILED: [[SimpleTest]]: [MySQL] Invalid patch format in l10n_project_select.patch.View details

#5

Status:needs review» needs work

1. Let's skip whitespace changes (maybe they were the ones already committed?)
2. Let's skip the nojs part. No need to point people that they are lame, if they have no JS.

Did not look/test yet with the other parts.

#6

Status:needs work» needs review

reroll

AttachmentSizeStatusTest resultOperations
l10n_project_select.patch5.16 KBIdleFAILED: [[SimpleTest]]: [MySQL] Invalid patch format in l10n_project_select_0.patch.View details

#7

Status:needs review» needs work

Trying to build this into the export form improvements I'm working on but not getting two things:

- what does this refer to? "if you choose 'All' and you change the project, you get the downloadfile as alert" - seeing this would be the role for the JS/NOJS marker on the form
- why do we need to set the form redirect in l10n_community_export_form_submit() if it was an invalid release?

#8

In fact applying this does not make any of the functionality work any different.

#9

Not sure if functionality have changed, but at time of writing you have selected the project and the version list havent updated. You only see the problem if projects don't share the same version numbers.

Long time ago that I've exported po files...

#10

Yes, I know what's the issue, I'm not seeing the patch working.

#11

Status:needs work» needs review
AttachmentSizeStatusTest resultOperations
l10n_project_select.patch4.42 KBIdleFAILED: [[SimpleTest]]: [MySQL] Invalid patch format in l10n_project_select_1.patch.View details

#12

Title:Export: selecting a project does not update releases radios» Selecting a project does not update releases radios on export
Component:Code» Export

I think what I've tested was picking a project and then the release list did not show up. If there was already a project selected before and a release, then picking another project would possibly update the release list, but it did not seem to work for the initial selection, which I think is not nice.

#13

ok,now with "initial selection"

[EDIT]
we can remove $form['js'], if we add in l10n_community_export_page_js
$form_state = array('storage' => NULL, 'submitted' => FALSE, 'rebuild' => TRUE);

because l10n_community_export_page_js -> drupal_process_form -> form_execute_handlers('submit', $form, $form_state); without 'rebuild' => TRUE.

AttachmentSizeStatusTest resultOperations
l10n_server_219017.patch4.92 KBIdleFAILED: [[SimpleTest]]: [MySQL] Invalid patch format in l10n_server_219017.patch.View details

#14

Title:Selecting a project does not update releases radios on export» Selecting a project does not update release options
Version:6.x-1.x-dev» 6.x-2.x-dev

Oh, boy, this was painful. I've looked into cleaning this up, and applying this same technique to the translation form (which is used even more, then this export form). I've also fixed this issue I mentioned above with first project / release selection to work. Instead of setting a random project (the first one) as the default, I think we should just display the whole form as it is.

I've applied the rebuild TRUE method you've provided too.

This is how the full patch looks now for the 6.x-2.x branch.

AttachmentSizeStatusTest resultOperations
release-picker-ahah.patch12.82 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch release-picker-ahah.patch.View details

#15

Status:needs review» reviewed & tested by the community

#16

Version:6.x-2.x-dev» 6.x-1.x-dev
Status:reviewed & tested by the community» patch (to be ported)

Ok, I figured that setting the form explicitly to be cached is not required. Apart from that committing the patch (modified version attached). To be ported to 1.x.

AttachmentSizeStatusTest resultOperations
release-picker-ahah.patch12.72 KBIgnored: Check issue status.NoneNone

#17

Version:6.x-1.x-dev» 6.x-2.x-dev
Status:patch (to be ported)» fixed

Actually, same patch applied with little offsets to 1.x. Committed, thanks!

#18

Oh, and deployed to localize.drupal.org too.

#19

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.