From 54e291896caf38c5ce893cb15f141373fc2aa271 Mon Sep 17 00:00:00 2001 From: Vidar Langseid Date: Tue, 13 Feb 2024 11:58:53 +0100 Subject: [PATCH 1/6] IBX-7579:Richtext: Rows are added to ezurl_object_link on every save --- .../Tests/Url/Gateway/DoctrineStorageTest.php | 23 ++++++++++ .../Core/FieldType/Url/UrlStorage/Gateway.php | 7 ++++ .../UrlStorage/Gateway/DoctrineStorage.php | 42 +++++++++++++++++++ 3 files changed, 72 insertions(+) diff --git a/eZ/Publish/Core/FieldType/Tests/Url/Gateway/DoctrineStorageTest.php b/eZ/Publish/Core/FieldType/Tests/Url/Gateway/DoctrineStorageTest.php index 793f9d0dc7..1a281224e2 100644 --- a/eZ/Publish/Core/FieldType/Tests/Url/Gateway/DoctrineStorageTest.php +++ b/eZ/Publish/Core/FieldType/Tests/Url/Gateway/DoctrineStorageTest.php @@ -194,6 +194,29 @@ public function testUnlinkUrl() $this->assertEquals($expected, $result); } + /** + * @covers \eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\DoctrineStorage::getUrlsFromUrlLink + */ + public function testGetUrlsFromUrlLink() + { + $gateway = $this->getStorageGateway(); + + $urlIds = []; + $urlIds[] = $gateway->insertUrl('https://ibexa.co/example1'); + $urlIds[] = $gateway->insertUrl('https://ibexa.co/example2'); + $urlIds[] = $gateway->insertUrl('https://ibexa.co/example3'); + + $gateway->linkUrl($urlIds[0], 10, 1); + $gateway->linkUrl($urlIds[1], 10, 1); + $gateway->linkUrl($urlIds[1], 12, 2); + $gateway->linkUrl($urlIds[2], 14, 1); + + self::assertEquals(['https://ibexa.co/example1' => true, 'https://ibexa.co/example2' => true], $gateway->getUrlsFromUrlLink(10, 1), 'Did not get expected urlS for field 10'); + self::assertEquals(['https://ibexa.co/example2' => true], $gateway->getUrlsFromUrlLink(12, 2), 'Did not get expected url for field 12'); + self::assertEquals(['https://ibexa.co/example3' => true], $gateway->getUrlsFromUrlLink(14, 1), 'Did not get expected url for field 14'); + self::assertEquals([], $gateway->getUrlsFromUrlLink(15, 1), 'Expected no urls for field 15'); + } + protected function getStorageGateway(): Gateway { if (!isset($this->storageGateway)) { diff --git a/eZ/Publish/Core/FieldType/Url/UrlStorage/Gateway.php b/eZ/Publish/Core/FieldType/Url/UrlStorage/Gateway.php index abb0e96a7f..a492c618d1 100644 --- a/eZ/Publish/Core/FieldType/Url/UrlStorage/Gateway.php +++ b/eZ/Publish/Core/FieldType/Url/UrlStorage/Gateway.php @@ -45,6 +45,13 @@ abstract public function getUrlIdMap(array $urls); */ abstract public function insertUrl($url); + /** + * Return a list of URLs used by the given field and version. + * + * @return bool[] An array of URLs, with urls as keys + */ + abstract public function getUrlsFromUrlLink(int $fieldId, int $versionNo): array; + /** * Creates link to URL with $urlId for field with $fieldId in $versionNo. * diff --git a/eZ/Publish/Core/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php b/eZ/Publish/Core/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php index 4629095095..6f40586fb1 100644 --- a/eZ/Publish/Core/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php +++ b/eZ/Publish/Core/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php @@ -129,6 +129,48 @@ public function insertUrl($url) ); } + /** + * Return a list of URLs used by the given field and version. + * + * @return bool[] An array of URLs, with urls as keys + */ + public function getUrlsFromUrlLink(int $fieldId, int $versionNo): array + { + $selectQuery = $this->connection->createQueryBuilder(); + $selectQuery + ->select($this->connection->quoteIdentifier('url.url')) + ->from($this->connection->quoteIdentifier(self::URL_TABLE), 'url') + ->leftJoin( + 'url', + $this->connection->quoteIdentifier(self::URL_LINK_TABLE), + 'link', + 'url.id = link.url_id' + ) + ->where( + $selectQuery->expr()->eq( + 'link.contentobject_attribute_id', + ':contentobject_attribute_id' + ) + ) + ->andWhere( + $selectQuery->expr()->eq( + 'link.contentobject_attribute_version', + ':contentobject_attribute_version' + ) + ) + ->setParameter(':contentobject_attribute_id', $fieldId, ParameterType::INTEGER) + ->setParameter(':contentobject_attribute_version', $versionNo, ParameterType::INTEGER); + + $statement = $selectQuery->execute(); + $rows = $statement->fetchAllAssociativeIndexed(); + $result = []; + foreach ($rows as $url => $item) { + $result[$url] = true; + } + + return $result; + } + /** * Create link to URL with $urlId for field with $fieldId in $versionNo. * From 1c1c742eac8a6b02baf3c4821c08c792ee3f5297 Mon Sep 17 00:00:00 2001 From: Vidar Langseid Date: Tue, 11 Jun 2024 14:57:59 +0200 Subject: [PATCH 2/6] fixup! IBX-7579:Richtext: Rows are added to ezurl_object_link on every save: Changed unit test into integration test --- .../Url/UrlStorage/UrlStorageGatewayTest.php | 41 +++++++++++++++++++ .../Tests/Url/Gateway/DoctrineStorageTest.php | 23 ----------- .../Gateway/UrlDoctrineStorageGatewayTest.php | 21 ++++++++++ 3 files changed, 62 insertions(+), 23 deletions(-) create mode 100644 eZ/Publish/Core/FieldType/Tests/Integration/Url/UrlStorage/UrlStorageGatewayTest.php create mode 100644 tests/integration/Core/FieldType/Url/UrlStorage/Gateway/UrlDoctrineStorageGatewayTest.php diff --git a/eZ/Publish/Core/FieldType/Tests/Integration/Url/UrlStorage/UrlStorageGatewayTest.php b/eZ/Publish/Core/FieldType/Tests/Integration/Url/UrlStorage/UrlStorageGatewayTest.php new file mode 100644 index 0000000000..c5823e26df --- /dev/null +++ b/eZ/Publish/Core/FieldType/Tests/Integration/Url/UrlStorage/UrlStorageGatewayTest.php @@ -0,0 +1,41 @@ +getGateway(); + + $urlIds = []; + $urlIds[] = $gateway->insertUrl('https://ibexa.co/example1'); + $urlIds[] = $gateway->insertUrl('https://ibexa.co/example2'); + $urlIds[] = $gateway->insertUrl('https://ibexa.co/example3'); + + $gateway->linkUrl($urlIds[0], 10, 1); + $gateway->linkUrl($urlIds[1], 10, 1); + $gateway->linkUrl($urlIds[1], 12, 2); + $gateway->linkUrl($urlIds[2], 14, 1); + + self::assertEquals(['https://ibexa.co/example1' => true, 'https://ibexa.co/example2' => true], $gateway->getUrlsFromUrlLink(10, 1), 'Did not get expected urlS for field 10'); + self::assertEquals(['https://ibexa.co/example2' => true], $gateway->getUrlsFromUrlLink(12, 2), 'Did not get expected url for field 12'); + self::assertEquals(['https://ibexa.co/example3' => true], $gateway->getUrlsFromUrlLink(14, 1), 'Did not get expected url for field 14'); + self::assertEquals([], $gateway->getUrlsFromUrlLink(15, 1), 'Expected no urls for field 15'); + } +} diff --git a/eZ/Publish/Core/FieldType/Tests/Url/Gateway/DoctrineStorageTest.php b/eZ/Publish/Core/FieldType/Tests/Url/Gateway/DoctrineStorageTest.php index 1a281224e2..793f9d0dc7 100644 --- a/eZ/Publish/Core/FieldType/Tests/Url/Gateway/DoctrineStorageTest.php +++ b/eZ/Publish/Core/FieldType/Tests/Url/Gateway/DoctrineStorageTest.php @@ -194,29 +194,6 @@ public function testUnlinkUrl() $this->assertEquals($expected, $result); } - /** - * @covers \eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\DoctrineStorage::getUrlsFromUrlLink - */ - public function testGetUrlsFromUrlLink() - { - $gateway = $this->getStorageGateway(); - - $urlIds = []; - $urlIds[] = $gateway->insertUrl('https://ibexa.co/example1'); - $urlIds[] = $gateway->insertUrl('https://ibexa.co/example2'); - $urlIds[] = $gateway->insertUrl('https://ibexa.co/example3'); - - $gateway->linkUrl($urlIds[0], 10, 1); - $gateway->linkUrl($urlIds[1], 10, 1); - $gateway->linkUrl($urlIds[1], 12, 2); - $gateway->linkUrl($urlIds[2], 14, 1); - - self::assertEquals(['https://ibexa.co/example1' => true, 'https://ibexa.co/example2' => true], $gateway->getUrlsFromUrlLink(10, 1), 'Did not get expected urlS for field 10'); - self::assertEquals(['https://ibexa.co/example2' => true], $gateway->getUrlsFromUrlLink(12, 2), 'Did not get expected url for field 12'); - self::assertEquals(['https://ibexa.co/example3' => true], $gateway->getUrlsFromUrlLink(14, 1), 'Did not get expected url for field 14'); - self::assertEquals([], $gateway->getUrlsFromUrlLink(15, 1), 'Expected no urls for field 15'); - } - protected function getStorageGateway(): Gateway { if (!isset($this->storageGateway)) { diff --git a/tests/integration/Core/FieldType/Url/UrlStorage/Gateway/UrlDoctrineStorageGatewayTest.php b/tests/integration/Core/FieldType/Url/UrlStorage/Gateway/UrlDoctrineStorageGatewayTest.php new file mode 100644 index 0000000000..16e72c251c --- /dev/null +++ b/tests/integration/Core/FieldType/Url/UrlStorage/Gateway/UrlDoctrineStorageGatewayTest.php @@ -0,0 +1,21 @@ +getDatabaseConnection()); + } +} From 26e6145d9ac897fa2181b69fa42345a83129cdfe Mon Sep 17 00:00:00 2001 From: Vidar Langseid Date: Wed, 19 Jun 2024 10:38:36 +0200 Subject: [PATCH 3/6] fixup! fixup! IBX-7579:Richtext: Rows are added to ezurl_object_link on every save: Changed unit test into integration test --- .../Url/UrlStorage/UrlStorageGatewayTest.php | 41 ------------------- .../UrlStorage/Gateway/DoctrineStorage.php | 8 ++-- .../Gateway/UrlDoctrineStorageGatewayTest.php | 29 +++++++++++-- 3 files changed, 30 insertions(+), 48 deletions(-) delete mode 100644 eZ/Publish/Core/FieldType/Tests/Integration/Url/UrlStorage/UrlStorageGatewayTest.php diff --git a/eZ/Publish/Core/FieldType/Tests/Integration/Url/UrlStorage/UrlStorageGatewayTest.php b/eZ/Publish/Core/FieldType/Tests/Integration/Url/UrlStorage/UrlStorageGatewayTest.php deleted file mode 100644 index c5823e26df..0000000000 --- a/eZ/Publish/Core/FieldType/Tests/Integration/Url/UrlStorage/UrlStorageGatewayTest.php +++ /dev/null @@ -1,41 +0,0 @@ -getGateway(); - - $urlIds = []; - $urlIds[] = $gateway->insertUrl('https://ibexa.co/example1'); - $urlIds[] = $gateway->insertUrl('https://ibexa.co/example2'); - $urlIds[] = $gateway->insertUrl('https://ibexa.co/example3'); - - $gateway->linkUrl($urlIds[0], 10, 1); - $gateway->linkUrl($urlIds[1], 10, 1); - $gateway->linkUrl($urlIds[1], 12, 2); - $gateway->linkUrl($urlIds[2], 14, 1); - - self::assertEquals(['https://ibexa.co/example1' => true, 'https://ibexa.co/example2' => true], $gateway->getUrlsFromUrlLink(10, 1), 'Did not get expected urlS for field 10'); - self::assertEquals(['https://ibexa.co/example2' => true], $gateway->getUrlsFromUrlLink(12, 2), 'Did not get expected url for field 12'); - self::assertEquals(['https://ibexa.co/example3' => true], $gateway->getUrlsFromUrlLink(14, 1), 'Did not get expected url for field 14'); - self::assertEquals([], $gateway->getUrlsFromUrlLink(15, 1), 'Expected no urls for field 15'); - } -} diff --git a/eZ/Publish/Core/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php b/eZ/Publish/Core/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php index 6f40586fb1..61d7a6b97f 100644 --- a/eZ/Publish/Core/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php +++ b/eZ/Publish/Core/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php @@ -132,7 +132,7 @@ public function insertUrl($url) /** * Return a list of URLs used by the given field and version. * - * @return bool[] An array of URLs, with urls as keys + * array An array of URLs, with urls as keys */ public function getUrlsFromUrlLink(int $fieldId, int $versionNo): array { @@ -140,7 +140,7 @@ public function getUrlsFromUrlLink(int $fieldId, int $versionNo): array $selectQuery ->select($this->connection->quoteIdentifier('url.url')) ->from($this->connection->quoteIdentifier(self::URL_TABLE), 'url') - ->leftJoin( + ->innerJoin( 'url', $this->connection->quoteIdentifier(self::URL_LINK_TABLE), 'link', @@ -162,9 +162,9 @@ public function getUrlsFromUrlLink(int $fieldId, int $versionNo): array ->setParameter(':contentobject_attribute_version', $versionNo, ParameterType::INTEGER); $statement = $selectQuery->execute(); - $rows = $statement->fetchAllAssociativeIndexed(); + $rows = $statement->fetchFirstColumn(); $result = []; - foreach ($rows as $url => $item) { + foreach ($rows as $url) { $result[$url] = true; } diff --git a/tests/integration/Core/FieldType/Url/UrlStorage/Gateway/UrlDoctrineStorageGatewayTest.php b/tests/integration/Core/FieldType/Url/UrlStorage/Gateway/UrlDoctrineStorageGatewayTest.php index 16e72c251c..aa0f72581d 100644 --- a/tests/integration/Core/FieldType/Url/UrlStorage/Gateway/UrlDoctrineStorageGatewayTest.php +++ b/tests/integration/Core/FieldType/Url/UrlStorage/Gateway/UrlDoctrineStorageGatewayTest.php @@ -6,14 +6,37 @@ */ declare(strict_types=1); -namespace Ibexa\Tests\integration\Core\FieldType\Url\UrlStorage\Gateway; +namespace Ibexa\Tests\Integration\Core\FieldType\Url\UrlStorage\Gateway; -use eZ\Publish\Core\FieldType\Tests\Integration\Url\UrlStorage\UrlStorageGatewayTest; +use eZ\Publish\Core\FieldType\Tests\Integration\BaseCoreFieldTypeIntegrationTest; use eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway as UrlStorageGateway; use eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\DoctrineStorage; -final class UrlDoctrineStorageGatewayTest extends UrlStorageGatewayTest +/** + * @covers \eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\DoctrineStorage + */ +final class UrlDoctrineStorageGatewayTest extends BaseCoreFieldTypeIntegrationTest { + public function testGetUrlsFromUrlLink(): void + { + $gateway = $this->getGateway(); + + $urlIds = []; + $urlIds[] = $gateway->insertUrl('https://ibexa.co/example1'); + $urlIds[] = $gateway->insertUrl('https://ibexa.co/example2'); + $urlIds[] = $gateway->insertUrl('https://ibexa.co/example3'); + + $gateway->linkUrl($urlIds[0], 10, 1); + $gateway->linkUrl($urlIds[1], 10, 1); + $gateway->linkUrl($urlIds[1], 12, 2); + $gateway->linkUrl($urlIds[2], 14, 1); + + self::assertEquals(['https://ibexa.co/example1' => true, 'https://ibexa.co/example2' => true], $gateway->getUrlsFromUrlLink(10, 1), 'Did not get expected urlS for field 10'); + self::assertEquals(['https://ibexa.co/example2' => true], $gateway->getUrlsFromUrlLink(12, 2), 'Did not get expected url for field 12'); + self::assertEquals(['https://ibexa.co/example3' => true], $gateway->getUrlsFromUrlLink(14, 1), 'Did not get expected url for field 14'); + self::assertEquals([], $gateway->getUrlsFromUrlLink(15, 1), 'Expected no urls for field 15'); + } + protected function getGateway(): UrlStorageGateway { return new DoctrineStorage($this->getDatabaseConnection()); From c6c0c22428a6948b6134459d98e31de76bc5ee1e Mon Sep 17 00:00:00 2001 From: Vidar Langseid Date: Wed, 19 Jun 2024 13:22:24 +0200 Subject: [PATCH 4/6] fixup! fixup! IBX-7579:Richtext: Rows are added to ezurl_object_link on every save: Changed unit test into integration test --- .../FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php | 8 ++------ .../UrlStorage/Gateway/UrlDoctrineStorageGatewayTest.php | 6 +++--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/eZ/Publish/Core/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php b/eZ/Publish/Core/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php index 61d7a6b97f..e627e69eb7 100644 --- a/eZ/Publish/Core/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php +++ b/eZ/Publish/Core/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php @@ -132,7 +132,7 @@ public function insertUrl($url) /** * Return a list of URLs used by the given field and version. * - * array An array of URLs, with urls as keys + * string[] An array of URLs */ public function getUrlsFromUrlLink(int $fieldId, int $versionNo): array { @@ -163,12 +163,8 @@ public function getUrlsFromUrlLink(int $fieldId, int $versionNo): array $statement = $selectQuery->execute(); $rows = $statement->fetchFirstColumn(); - $result = []; - foreach ($rows as $url) { - $result[$url] = true; - } - return $result; + return $rows; } /** diff --git a/tests/integration/Core/FieldType/Url/UrlStorage/Gateway/UrlDoctrineStorageGatewayTest.php b/tests/integration/Core/FieldType/Url/UrlStorage/Gateway/UrlDoctrineStorageGatewayTest.php index aa0f72581d..c290fa05a7 100644 --- a/tests/integration/Core/FieldType/Url/UrlStorage/Gateway/UrlDoctrineStorageGatewayTest.php +++ b/tests/integration/Core/FieldType/Url/UrlStorage/Gateway/UrlDoctrineStorageGatewayTest.php @@ -31,9 +31,9 @@ public function testGetUrlsFromUrlLink(): void $gateway->linkUrl($urlIds[1], 12, 2); $gateway->linkUrl($urlIds[2], 14, 1); - self::assertEquals(['https://ibexa.co/example1' => true, 'https://ibexa.co/example2' => true], $gateway->getUrlsFromUrlLink(10, 1), 'Did not get expected urlS for field 10'); - self::assertEquals(['https://ibexa.co/example2' => true], $gateway->getUrlsFromUrlLink(12, 2), 'Did not get expected url for field 12'); - self::assertEquals(['https://ibexa.co/example3' => true], $gateway->getUrlsFromUrlLink(14, 1), 'Did not get expected url for field 14'); + self::assertEquals(['https://ibexa.co/example1', 'https://ibexa.co/example2'], $gateway->getUrlsFromUrlLink(10, 1), 'Did not get expected urls for field 10'); + self::assertEquals(['https://ibexa.co/example2'], $gateway->getUrlsFromUrlLink(12, 2), 'Did not get expected url for field 12'); + self::assertEquals(['https://ibexa.co/example3'], $gateway->getUrlsFromUrlLink(14, 1), 'Did not get expected url for field 14'); self::assertEquals([], $gateway->getUrlsFromUrlLink(15, 1), 'Expected no urls for field 15'); } From f21a80ebf04ed6d7c5455bb8a240d706053713a5 Mon Sep 17 00:00:00 2001 From: Vidar Langseid Date: Wed, 19 Jun 2024 15:44:20 +0200 Subject: [PATCH 5/6] fixup! fixup! fixup! IBX-7579:Richtext: Rows are added to ezurl_object_link on every save: Changed unit test into integration test --- .../Url/UrlStorage/Gateway/UrlDoctrineStorageGatewayTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/integration/Core/FieldType/Url/UrlStorage/Gateway/UrlDoctrineStorageGatewayTest.php b/tests/integration/Core/FieldType/Url/UrlStorage/Gateway/UrlDoctrineStorageGatewayTest.php index c290fa05a7..cbfb12e1a6 100644 --- a/tests/integration/Core/FieldType/Url/UrlStorage/Gateway/UrlDoctrineStorageGatewayTest.php +++ b/tests/integration/Core/FieldType/Url/UrlStorage/Gateway/UrlDoctrineStorageGatewayTest.php @@ -31,7 +31,9 @@ public function testGetUrlsFromUrlLink(): void $gateway->linkUrl($urlIds[1], 12, 2); $gateway->linkUrl($urlIds[2], 14, 1); - self::assertEquals(['https://ibexa.co/example1', 'https://ibexa.co/example2'], $gateway->getUrlsFromUrlLink(10, 1), 'Did not get expected urls for field 10'); + $urls = $gateway->getUrlsFromUrlLink(10, 1); + asort($urls); + self::assertEquals(['https://ibexa.co/example1', 'https://ibexa.co/example2'], $urls, 'Did not get expected urls for field 10'); self::assertEquals(['https://ibexa.co/example2'], $gateway->getUrlsFromUrlLink(12, 2), 'Did not get expected url for field 12'); self::assertEquals(['https://ibexa.co/example3'], $gateway->getUrlsFromUrlLink(14, 1), 'Did not get expected url for field 14'); self::assertEquals([], $gateway->getUrlsFromUrlLink(15, 1), 'Expected no urls for field 15'); From 52df597e478ba0ab98d1b9ccc7b6cb3213989d18 Mon Sep 17 00:00:00 2001 From: Vidar Langseid Date: Thu, 20 Jun 2024 12:19:21 +0200 Subject: [PATCH 6/6] fixup! fixup! fixup! fixup! IBX-7579:Richtext: Rows are added to ezurl_object_link on every save: Changed unit test into integration test --- .../Url/UrlStorage/Gateway/UrlDoctrineStorageGatewayTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/Core/FieldType/Url/UrlStorage/Gateway/UrlDoctrineStorageGatewayTest.php b/tests/integration/Core/FieldType/Url/UrlStorage/Gateway/UrlDoctrineStorageGatewayTest.php index cbfb12e1a6..9306139198 100644 --- a/tests/integration/Core/FieldType/Url/UrlStorage/Gateway/UrlDoctrineStorageGatewayTest.php +++ b/tests/integration/Core/FieldType/Url/UrlStorage/Gateway/UrlDoctrineStorageGatewayTest.php @@ -32,7 +32,7 @@ public function testGetUrlsFromUrlLink(): void $gateway->linkUrl($urlIds[2], 14, 1); $urls = $gateway->getUrlsFromUrlLink(10, 1); - asort($urls); + sort($urls); self::assertEquals(['https://ibexa.co/example1', 'https://ibexa.co/example2'], $urls, 'Did not get expected urls for field 10'); self::assertEquals(['https://ibexa.co/example2'], $gateway->getUrlsFromUrlLink(12, 2), 'Did not get expected url for field 12'); self::assertEquals(['https://ibexa.co/example3'], $gateway->getUrlsFromUrlLink(14, 1), 'Did not get expected url for field 14');