There is an error in the SQL syntax if not all options in the formatter settings are selected.

Created on 29 April 2024, 7 months ago
Updated 1 May 2024, 7 months ago

Errors:

Select abbrev format setting.
Update and save.
Return to /node/1.
WSOD. Log message: Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at end of input LINE 1: SELECT abbrev(cidr '192.168.100.0/24') as "abbrev", ^: SELECT abbrev(cidr :ipAddressString) as "abbrev",; Array ( [:ipAddressString] => 192.168.100.0/24 ) in Drupal\field_ipaddress_pgsql\Plugin\Field\FieldFormatter\IpAddressCidrFormatter->viewValue() (line 222 of /var/www/html/alpha/web/modules/contrib/field_ipaddress_pgsql/src/Plugin/Field/FieldFormatter/IpAddressCidrFormatter.php).

Select broadcast format setting.
Update and save.
Return to /node/1.
WSOD. Log message: Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at end of input LINE 1: SELECT broadcast(cidr '192.168.100.0/24') as "broadcast", ^: SELECT broadcast(cidr :ipAddressString) as "broadcast",; Array ( [:ipAddressString] => 192.168.100.0/24 ) in Drupal\field_ipaddress_pgsql\Plugin\Field\FieldFormatter\IpAddressCidrFormatter->viewValue() (line 222 of /var/www/html/alpha/web/modules/contrib/field_ipaddress_pgsql/src/Plugin/Field/FieldFormatter/IpAddressCidrFormatter.php).

Select family format setting.
Update and save.
Return to /node/1.
WSOD. Log message: Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at end of input LINE 1: SELECT family(cidr '192.168.100.0/24') as "family", ^: SELECT family(cidr :ipAddressString) as "family",; Array ( [:ipAddressString] => 192.168.100.0/24 ) in Drupal\field_ipaddress_pgsql\Plugin\Field\FieldFormatter\IpAddressCidrFormatter->viewValue() (line 222 of /var/www/html/alpha/web/modules/contrib/field_ipaddress_pgsql/src/Plugin/Field/FieldFormatter/IpAddressCidrFormatter.php).

Select host format setting.
Update and save.
Return to /node/1.
WSOD. Log message: Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at end of input LINE 1: SELECT host(cidr '192.168.100.0/24') as "host", ^: SELECT host(cidr :ipAddressString) as "host",; Array ( [:ipAddressString] => 192.168.100.0/24 ) in Drupal\field_ipaddress_pgsql\Plugin\Field\FieldFormatter\IpAddressCidrFormatter->viewValue() (line 222 of /var/www/html/alpha/web/modules/contrib/field_ipaddress_pgsql/src/Plugin/Field/FieldFormatter/IpAddressCidrFormatter.php).

Select hostmask format setting.
Update and save.
Return to /node/1.
WSOD. Log message: Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at end of input LINE 1: SELECT hostmask(cidr '192.168.100.0/24') as "hostmask", ^: SELECT hostmask(cidr :ipAddressString) as "hostmask",; Array ( [:ipAddressString] => 192.168.100.0/24 ) in Drupal\field_ipaddress_pgsql\Plugin\Field\FieldFormatter\IpAddressCidrFormatter->viewValue() (line 222 of /var/www/html/alpha/web/modules/contrib/field_ipaddress_pgsql/src/Plugin/Field/FieldFormatter/IpAddressCidrFormatter.php).

Select masklen format setting.
Update and save.
Return to /node/1.
WSOD. Log message: Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at end of input LINE 1: SELECT masklen(cidr '192.168.100.0/24') as "masklen", ^: SELECT masklen(cidr :ipAddressString) as "masklen",; Array ( [:ipAddressString] => 192.168.100.0/24 ) in Drupal\field_ipaddress_pgsql\Plugin\Field\FieldFormatter\IpAddressCidrFormatter->viewValue() (line 222 of /var/www/html/alpha/web/modules/contrib/field_ipaddress_pgsql/src/Plugin/Field/FieldFormatter/IpAddressCidrFormatter.php).

Select netmask format setting.
Update and save.
Return to /node/1.
WSOD. Log message: Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at end of input LINE 1: SELECT netmask(cidr '192.168.100.0/24') as "netmask", ^: SELECT netmask(cidr :ipAddressString) as "netmask",; Array ( [:ipAddressString] => 192.168.100.0/24 ) in Drupal\field_ipaddress_pgsql\Plugin\Field\FieldFormatter\IpAddressCidrFormatter->viewValue() (line 222 of /var/www/html/alpha/web/modules/contrib/field_ipaddress_pgsql/src/Plugin/Field/FieldFormatter/IpAddressCidrFormatter.php).

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024