Rik,
I use WE, so this might be a non-issue. I just committed the UI improvements. You might want to double-check that all is okay in WE.

CommentFileSizeAuthor
#16 1937462.patch568 bytesnancydru
#13 fr.png97.83 KBTed51
#13 en2.png86.87 KBTed51

Comments

nancydru’s picture

Might want to look at:

Notice: Undefined index: Nancy's Excellent Workflow in workflow_extensions_form_alter() (line 201 of C:\wamp\www\drupal7\sites\all\modules\contrib\workflow_extensions\workflow_extensions.module). =>

Looks like WE has an issue with workflow names with quotes in them.

Ted51’s picture

I get the same notice with WE 7.x-1.0-beta3 release after translating UI.

rdeboer’s picture

Assigned: Unassigned » rdeboer

Fixed with latest check-in.

It appears that in the Workflow module the workflow name is passed through (mangled in) check_plain() and this is now mirrored in Workflow Extensions to match the name.
This works fine, but doesn't render great, e.g. a workflow name like "Rik's Workflow" renders as "Rik's Workflow", both in Workflow and in Workflow Extensions.

Rik

rdeboer’s picture

Title: Major UI improvements in Workflow » Special characters in workflow names
Status: Active » Fixed
Ted51’s picture

Is'it fixed for WE 7.x-1.0-beta3 too ?

rdeboer’s picture

Hi Ted,
No it's in 7.x-1.x-dev.
We need people like you to download and test-drive that version and report back to this issue queue with your findings.
Then if enough people confirm that it's fixed in 7.x-1.x-dev, we can confidently release a "stable" 7.x-1.0-beta4 or maybe even a 7.x-1.0 !
Look forward to your report!
Rik

Ted51’s picture

Hi RdeBoer,

Thank you for your reply. With WE 7.x-1.0-beta3+2-dev, I still have a Notice : Undefined index at line 201 of workflow_extensions.module. In my tranlated words I have replaced all letters with accent. For instance, I have replaced 'Publié' with 'Publie' and I still have the same notice.

On my install I have : Drupal core 7.22, Internationalization 7.x-1.8 and Workflow 7.x-1.1

Thank you for your help

rdeboer’s picture

Ok, then it is most likely something to do with translations as I definitely fixed the special character thing...
Looks like translations are not being supported sufficiently in either the Workflow or Workflow Extensions 7.x-1.x-dev modules.
Just so that we can zoom in on the root cause... If you disable (but not uninstall) Internationalization, does the error/notice disappear?
Rik

Ted51’s picture

When I disable Internationalization the error/notice disappear.

When Internationalization is activated, I can create content in english with no notice and the 3 form styles (Radio buttons, Single-action buttons and Dropdown selector) work like expected.

The notice appears when I try to create content in french and in this case, the selection of Single-action buttons or Dropdown selector styles work like Radio buttons style selection.

Hope this can help to fix the issue.

nancydru’s picture

I saw the error this morning, Rik. But it seems to have gone away when I fix the special character issue.

As for the special characters, that is on Workflow. #1972728: Special Characters in Workflow name

Ted51’s picture

#10 don't solve the issue for me.

nancydru’s picture

@Ted51: Could you provide a screen shot, please?

Ted51’s picture

StatusFileSize
new86.87 KB
new97.83 KB

Hi NancyDru,

To reproduce the notice, you can install : Drupal core 7.22 (with Content translation and Locale), Variable 7.x-2.2, Internationalization 7.x-1.8, Language Switcher Dropdown 7.x-1.5, Revisioning 7.x-1.4, Workflow 7.x-1.1 and Workflow Extensions 7.x-1.0-beta3+2-dev.

rdeboer’s picture

Title: Special characters in workflow names » Translated workflow names break Workflow + Workflow Extensions combo

Ok, so we've isolated the issue. Changing title.

nancydru’s picture

Please try going to line 200 in workflow.pages.inc and remove the check_plain(). Let's see if that helps.

Rik, we need to look at the return in workflow_extensions_extract_workflow_name(). It probably should not have the check_plain().

nancydru’s picture

Status: Fixed » Active
StatusFileSize
new568 bytes

Here's a patch for WE. There needs to be a companion patch in Workflow (#1972728: Special Characters in Workflow name).

Ted51’s picture

Hi NancyDru,

I have removed patch of #10 and applied the two patchs of #16 but I still have the same notice.

nancydru’s picture

There will be a new -dev release of Workflow later this evening. After trying that, a new screenshot might help me.

rdeboer’s picture

@NancyDru #15:

Sure I only put that in days ago to match same in Workflow. I've taken it out again.
Note that if the translation does not contain special characters the absence or presence of check_plain() won't make difference.

Rik

nancydru’s picture

Yes, that's correct. As it turns out, I had set up a test workflow called "Nancy's Excellent Workflow" so I had been seeing this already.

After making these changes, I also tested with a workflow named "

alert('uh oh');

" to make sure we weren't introducing security issues. That is properly escaped now and quotes look like quotes.

rdeboer’s picture

So at the end of all that what does this mean for Ted51's issue with translations? Has that come out of the wash clean?

nancydru’s picture

Status: Active » Needs review

IIRC, you will still need the patch I submitted, then everything should be okay. Looks like you've already done that, so let's close this.

rdeboer’s picture

Status: Needs review » Closed (fixed)

The patch just changes Workflow Extensions back to what it was.
So, ok, closing.