Setting webtexttool_language in webtexttool_form_node_form_alter has incorrect default

Created on 19 September 2023, about 1 year ago

Problem/Motivation

$form['webtexttool']['tabs_wrapper']['seo']['webtexttool_language'] in webtexttool.node.inc uses an empty string when $node->webtexttool_language is not set.

This leads to all entries in DB-table having value 'us' for field 'lang' whenever the "Keyword suggestions language" isn't explicitly set to a language.

Steps to reproduce

Proposed resolution

Replace empty string with variable_get('webtexttool_language', 'en')

Note: This patch will only correct the behaviour of new nodes. Already processed nodes will have language 'us' by now and need to be updated to the correct language (most probably through a hook_n_update)

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇳🇱Netherlands spokje

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024