Plugin Directory


Opened 10 years ago

Last modified 9 years ago

#883 assigned defect

Gengo widget not theme (and xhtml) compliant

Reported by: conradoplg Owned by: pixline
Priority: normal Severity: normal
Plugin: gengo Keywords: has-patch, need-testing
Cc: supporto@…


The Gengo "Language Controls" widget is not theme compliant.

Since it adds hard-coded h2 headers in each widget section header, it may break themes since their heading structure may be different.

I'm not sure which is the best way to fix this, but in the attached patch, I basically treated the widget like three distinct widgets in sequence.

I've also fixed a minor issue which prevents XHTML validation: the "Language control" ul element had the same id as the "Available languages" ul element. I've changed it, but I'm not 100% sure if this can't break something (I've tested it and found no problems)

Attachments (2)

widget_theme_compliant.diff (2.7 KB) - added by conradoplg 10 years ago.
widget_theme_compliant2.diff (5.6 KB) - added by conradoplg 10 years ago.
2nd try

Download all attachments as: .zip

Change History (7)

comment:1 @conradoplg10 years ago

I've just realized that the diff breaks the "gengo_language_control" function, so it needs some tweaking...

comment:2 @conradoplg10 years ago

...aaand realized that this breaks XHTML again by generating 3 ul's with the same id "gengo_command". I'm not sure how to fix this.

comment:3 @pixline10 years ago

  • Owner changed from majelbstoat to pixline

The patch is invalid, but the issue stll exists.

@conradoplg10 years ago

2nd try

comment:4 @conradoplg10 years ago

Here is another try at a patch.

It doesn't break anything as far as I know, since now I'm using default argument parameters. Solved the repeated id issue with a hack, but I think it does the job.

Tested with widgets and template functions, works OK. XHTML compliant.

Also did some tweaking to the js code for the add/remove languages in order to display "None" on "Available Languages" when there is none. (Before it wasn't XHTML compliant due to the ul element without li's)

comment:5 @pixline9 years ago

  • Cc supporto@… added
  • Keywords has-patch need-testing added
  • Status changed from new to assigned
Note: See TracTickets for help on using tickets.