Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ErrorException: Array to string conversion #17

Closed
nitech opened this issue Aug 12, 2019 · 11 comments
Closed

ErrorException: Array to string conversion #17

nitech opened this issue Aug 12, 2019 · 11 comments

Comments

@nitech
Copy link

nitech commented Aug 12, 2019

When I change the propagation method on an section, I get this error inside queue.log - and Craft will attempt rerunning the job over and over again:

2019-08-12 03:00:19 [-][1][-][info][yii\db\Command::query] SELECT `elements`.`id`, `elements`.`fieldLayoutId`, `elements`.`uid`, `elements`.`enabled`, `elements`.`archived`, `elements`.`dateCreated`, `elements`.`dateUpdated`, `elements_sites`.`slug`, `elements_sites`.`siteId`, `elements_sites`.`uri`, `elements_sites`.`enabled` AS `enabledForSite`, `entries`.`sectionId`, `entries`.`typeId`, `entries`.`authorId`, `entries`.`postDate`, `entries`.`expiryDate`, `content`.`id` AS `contentId`, `content`.`title`, `content`.`field_acknowledgementsLink`, `content`.`field_nominalPressure`, `content`.`field_bodyText`, `content`.`field_button`, `content`.`field_cookiesLink`, `content`.`field_description`, `content`.`field_productDescription`, `content`.`field_personEmail`, `content`.`field_externalLink`, `content`.`field_dispersedAirVolume`, `content`.`field_cylinderVolume`, `content`.`field_groupListHeader`, `content`.`field_locationIntro`, `content`.`field_mainEmail`, `content`.`field_maxPressure`, `content`.`field_moreContactInfoLink`, `content`.`field_effect`, `content`.`field_locationName`, `content`.`field_personName`, `content`.`field_productName`, `content`.`field_openInNewWindow`, `content`.`field_overskrift`, `content`.`field_personPhone`, `content`.`field_buttonPrimary`, `content`.`field_relatedElementsHeader`, `content`.`field_relationTypes`, `content`.`field_seo`, `content`.`field_showRelatedElements`, `content`.`field_size`, `content`.`field_slideText`, `content`.`field_videoSlideText`, `content`.`field_slideTitle`, `content`.`field_videoSlideTitle`, `content`.`field_stretch`, `content`.`field_power`, `content`.`field_db`, `content`.`field_focusItemSubtitle`, `content`.`field_heroSubtitle`, `content`.`field_subtitle`, `content`.`field_bodyIntro`, `content`.`field_featureText`, `content`.`field_storyText`, `content`.`field_bodyTitle`, `content`.`field_featureTitle`, `content`.`field_focusItemTitle`, `content`.`field_focusTitle`, `content`.`field_heroTitle`, `content`.`field_personTitle`, `content`.`field_storyTitle`, `content`.`field_embed`, `content`.`field_videoUrl`, `content`.`field_volume`, `structureelements`.`root`, `structureelements`.`lft`, `structureelements`.`rgt`, `structureelements`.`level`, `structureelements`.`structureId`
FROM (SELECT `elements`.`id` AS `elementsId`, `elements_sites`.`id` AS `elementsSitesId`, `content`.`id` AS `contentId`, `structureelements`.`structureId`
FROM `elements` `elements`
INNER JOIN `entries` `entries` ON `entries`.`id` = `elements`.`id`
INNER JOIN `elements_sites` `elements_sites` ON `elements_sites`.`elementId` = `elements`.`id`
INNER JOIN `content` `content` ON (`content`.`elementId` = `elements`.`id`) AND (`content`.`siteId` = `elements_sites`.`siteId`)
LEFT JOIN `structureelements` `structureelements` ON (`structureelements`.`elementId` = `elements`.`id`) AND (EXISTS (SELECT *
FROM `structures`
WHERE (`id` = `structureelements`.`structureId`) AND (`dateDeleted` IS NULL)))
INNER JOIN `relations` `relations` ON (`relations`.`targetId` = `elements`.`id`) AND ((`relations`.`sourceId`='467') AND (`relations`.`fieldId`='56')) AND ((`relations`.`sourceSiteId` IS NULL) OR (`relations`.`sourceSiteId`='1'))
WHERE (`elements`.`archived`=FALSE) AND (`elements`.`dateDeleted` IS NULL) AND (`elements`.`draftId` IS NULL) AND (`elements`.`revisionId` IS NULL) AND (`elements_sites`.`id` = (SELECT `elements_sites`.`id`
FROM `elements` `subElements`
INNER JOIN `entries` `entries` ON `entries`.`id` = `subElements`.`id`
INNER JOIN `elements_sites` `elements_sites` ON `elements_sites`.`elementId` = `subElements`.`id`
INNER JOIN `content` `content` ON (`content`.`elementId` = `subElements`.`id`) AND (`content`.`siteId` = `elements_sites`.`siteId`)
LEFT JOIN `structureelements` `structureelements` ON (`structureelements`.`elementId` = `subElements`.`id`) AND (EXISTS (SELECT *
FROM `structures`
WHERE (`id` = `structureelements`.`structureId`) AND (`dateDeleted` IS NULL)))
INNER JOIN `relations` `relations` ON (`relations`.`targetId` = `subElements`.`id`) AND ((`relations`.`sourceId`='467') AND (`relations`.`fieldId`='56')) AND ((`relations`.`sourceSiteId` IS NULL) OR (`relations`.`sourceSiteId`='1'))
WHERE (`subElements`.`archived`=FALSE) AND (`subElements`.`dateDeleted` IS NULL) AND (`subElements`.`draftId` IS NULL) AND (`subElements`.`revisionId` IS NULL) AND (`subElements`.`id` = `elements`.`id`)
ORDER BY case when `elements_sites`.`siteId` = 1 then 0 else 1 end, `elements_sites`.`id`
LIMIT 1))
ORDER BY `relations`.`sortOrder`
LIMIT 1) `subquery`
INNER JOIN `entries` `entries` ON `entries`.`id` = `subquery`.`elementsId`
INNER JOIN `elements` `elements` ON `elements`.`id` = `subquery`.`elementsId`
INNER JOIN `elements_sites` `elements_sites` ON `elements_sites`.`id` = `subquery`.`elementsSitesId`
INNER JOIN `content` `content` ON `content`.`id` = `subquery`.`contentId`
LEFT JOIN `structureelements` `structureelements` ON (`structureelements`.`elementId` = `subquery`.`elementsId`) AND (`structureelements`.`structureId` = `subquery`.`structureId`)
INNER JOIN `relations` `relations` ON (`relations`.`targetId` = `elements`.`id`) AND ((`relations`.`sourceId`='467') AND (`relations`.`fieldId`='56')) AND ((`relations`.`sourceSiteId` IS NULL) OR (`relations`.`sourceSiteId`='1'))
ORDER BY `relations`.`sortOrder`
2019-08-12 03:00:19 [-][1][-][profile begin][yii\db\Command::query] SELECT `elements`.`id`, `elements`.`fieldLayoutId`, `elements`.`uid`, `elements`.`enabled`, `elements`.`archived`, `elements`.`dateCreated`, `elements`.`dateUpdated`, `elements_sites`.`slug`, `elements_sites`.`siteId`, `elements_sites`.`uri`, `elements_sites`.`enabled` AS `enabledForSite`, `entries`.`sectionId`, `entries`.`typeId`, `entries`.`authorId`, `entries`.`postDate`, `entries`.`expiryDate`, `content`.`id` AS `contentId`, `content`.`title`, `content`.`field_acknowledgementsLink`, `content`.`field_nominalPressure`, `content`.`field_bodyText`, `content`.`field_button`, `content`.`field_cookiesLink`, `content`.`field_description`, `content`.`field_productDescription`, `content`.`field_personEmail`, `content`.`field_externalLink`, `content`.`field_dispersedAirVolume`, `content`.`field_cylinderVolume`, `content`.`field_groupListHeader`, `content`.`field_locationIntro`, `content`.`field_mainEmail`, `content`.`field_maxPressure`, `content`.`field_moreContactInfoLink`, `content`.`field_effect`, `content`.`field_locationName`, `content`.`field_personName`, `content`.`field_productName`, `content`.`field_openInNewWindow`, `content`.`field_overskrift`, `content`.`field_personPhone`, `content`.`field_buttonPrimary`, `content`.`field_relatedElementsHeader`, `content`.`field_relationTypes`, `content`.`field_seo`, `content`.`field_showRelatedElements`, `content`.`field_size`, `content`.`field_slideText`, `content`.`field_videoSlideText`, `content`.`field_slideTitle`, `content`.`field_videoSlideTitle`, `content`.`field_stretch`, `content`.`field_power`, `content`.`field_db`, `content`.`field_focusItemSubtitle`, `content`.`field_heroSubtitle`, `content`.`field_subtitle`, `content`.`field_bodyIntro`, `content`.`field_featureText`, `content`.`field_storyText`, `content`.`field_bodyTitle`, `content`.`field_featureTitle`, `content`.`field_focusItemTitle`, `content`.`field_focusTitle`, `content`.`field_heroTitle`, `content`.`field_personTitle`, `content`.`field_storyTitle`, `content`.`field_embed`, `content`.`field_videoUrl`, `content`.`field_volume`, `structureelements`.`root`, `structureelements`.`lft`, `structureelements`.`rgt`, `structureelements`.`level`, `structureelements`.`structureId`
FROM (SELECT `elements`.`id` AS `elementsId`, `elements_sites`.`id` AS `elementsSitesId`, `content`.`id` AS `contentId`, `structureelements`.`structureId`
FROM `elements` `elements`
INNER JOIN `entries` `entries` ON `entries`.`id` = `elements`.`id`
INNER JOIN `elements_sites` `elements_sites` ON `elements_sites`.`elementId` = `elements`.`id`
INNER JOIN `content` `content` ON (`content`.`elementId` = `elements`.`id`) AND (`content`.`siteId` = `elements_sites`.`siteId`)
LEFT JOIN `structureelements` `structureelements` ON (`structureelements`.`elementId` = `elements`.`id`) AND (EXISTS (SELECT *
FROM `structures`
WHERE (`id` = `structureelements`.`structureId`) AND (`dateDeleted` IS NULL)))
INNER JOIN `relations` `relations` ON (`relations`.`targetId` = `elements`.`id`) AND ((`relations`.`sourceId`='467') AND (`relations`.`fieldId`='56')) AND ((`relations`.`sourceSiteId` IS NULL) OR (`relations`.`sourceSiteId`='1'))
WHERE (`elements`.`archived`=FALSE) AND (`elements`.`dateDeleted` IS NULL) AND (`elements`.`draftId` IS NULL) AND (`elements`.`revisionId` IS NULL) AND (`elements_sites`.`id` = (SELECT `elements_sites`.`id`
FROM `elements` `subElements`
INNER JOIN `entries` `entries` ON `entries`.`id` = `subElements`.`id`
INNER JOIN `elements_sites` `elements_sites` ON `elements_sites`.`elementId` = `subElements`.`id`
INNER JOIN `content` `content` ON (`content`.`elementId` = `subElements`.`id`) AND (`content`.`siteId` = `elements_sites`.`siteId`)
LEFT JOIN `structureelements` `structureelements` ON (`structureelements`.`elementId` = `subElements`.`id`) AND (EXISTS (SELECT *
FROM `structures`
WHERE (`id` = `structureelements`.`structureId`) AND (`dateDeleted` IS NULL)))
INNER JOIN `relations` `relations` ON (`relations`.`targetId` = `subElements`.`id`) AND ((`relations`.`sourceId`='467') AND (`relations`.`fieldId`='56')) AND ((`relations`.`sourceSiteId` IS NULL) OR (`relations`.`sourceSiteId`='1'))
WHERE (`subElements`.`archived`=FALSE) AND (`subElements`.`dateDeleted` IS NULL) AND (`subElements`.`draftId` IS NULL) AND (`subElements`.`revisionId` IS NULL) AND (`subElements`.`id` = `elements`.`id`)
ORDER BY case when `elements_sites`.`siteId` = 1 then 0 else 1 end, `elements_sites`.`id`
LIMIT 1))
ORDER BY `relations`.`sortOrder`
LIMIT 1) `subquery`
INNER JOIN `entries` `entries` ON `entries`.`id` = `subquery`.`elementsId`
INNER JOIN `elements` `elements` ON `elements`.`id` = `subquery`.`elementsId`
INNER JOIN `elements_sites` `elements_sites` ON `elements_sites`.`id` = `subquery`.`elementsSitesId`
INNER JOIN `content` `content` ON `content`.`id` = `subquery`.`contentId`
LEFT JOIN `structureelements` `structureelements` ON (`structureelements`.`elementId` = `subquery`.`elementsId`) AND (`structureelements`.`structureId` = `subquery`.`structureId`)
INNER JOIN `relations` `relations` ON (`relations`.`targetId` = `elements`.`id`) AND ((`relations`.`sourceId`='467') AND (`relations`.`fieldId`='56')) AND ((`relations`.`sourceSiteId` IS NULL) OR (`relations`.`sourceSiteId`='1'))
ORDER BY `relations`.`sortOrder`
2019-08-12 03:00:19 [-][1][-][profile end][yii\db\Command::query] SELECT `elements`.`id`, `elements`.`fieldLayoutId`, `elements`.`uid`, `elements`.`enabled`, `elements`.`archived`, `elements`.`dateCreated`, `elements`.`dateUpdated`, `elements_sites`.`slug`, `elements_sites`.`siteId`, `elements_sites`.`uri`, `elements_sites`.`enabled` AS `enabledForSite`, `entries`.`sectionId`, `entries`.`typeId`, `entries`.`authorId`, `entries`.`postDate`, `entries`.`expiryDate`, `content`.`id` AS `contentId`, `content`.`title`, `content`.`field_acknowledgementsLink`, `content`.`field_nominalPressure`, `content`.`field_bodyText`, `content`.`field_button`, `content`.`field_cookiesLink`, `content`.`field_description`, `content`.`field_productDescription`, `content`.`field_personEmail`, `content`.`field_externalLink`, `content`.`field_dispersedAirVolume`, `content`.`field_cylinderVolume`, `content`.`field_groupListHeader`, `content`.`field_locationIntro`, `content`.`field_mainEmail`, `content`.`field_maxPressure`, `content`.`field_moreContactInfoLink`, `content`.`field_effect`, `content`.`field_locationName`, `content`.`field_personName`, `content`.`field_productName`, `content`.`field_openInNewWindow`, `content`.`field_overskrift`, `content`.`field_personPhone`, `content`.`field_buttonPrimary`, `content`.`field_relatedElementsHeader`, `content`.`field_relationTypes`, `content`.`field_seo`, `content`.`field_showRelatedElements`, `content`.`field_size`, `content`.`field_slideText`, `content`.`field_videoSlideText`, `content`.`field_slideTitle`, `content`.`field_videoSlideTitle`, `content`.`field_stretch`, `content`.`field_power`, `content`.`field_db`, `content`.`field_focusItemSubtitle`, `content`.`field_heroSubtitle`, `content`.`field_subtitle`, `content`.`field_bodyIntro`, `content`.`field_featureText`, `content`.`field_storyText`, `content`.`field_bodyTitle`, `content`.`field_featureTitle`, `content`.`field_focusItemTitle`, `content`.`field_focusTitle`, `content`.`field_heroTitle`, `content`.`field_personTitle`, `content`.`field_storyTitle`, `content`.`field_embed`, `content`.`field_videoUrl`, `content`.`field_volume`, `structureelements`.`root`, `structureelements`.`lft`, `structureelements`.`rgt`, `structureelements`.`level`, `structureelements`.`structureId`
FROM (SELECT `elements`.`id` AS `elementsId`, `elements_sites`.`id` AS `elementsSitesId`, `content`.`id` AS `contentId`, `structureelements`.`structureId`
FROM `elements` `elements`
INNER JOIN `entries` `entries` ON `entries`.`id` = `elements`.`id`
INNER JOIN `elements_sites` `elements_sites` ON `elements_sites`.`elementId` = `elements`.`id`
INNER JOIN `content` `content` ON (`content`.`elementId` = `elements`.`id`) AND (`content`.`siteId` = `elements_sites`.`siteId`)
LEFT JOIN `structureelements` `structureelements` ON (`structureelements`.`elementId` = `elements`.`id`) AND (EXISTS (SELECT *
FROM `structures`
WHERE (`id` = `structureelements`.`structureId`) AND (`dateDeleted` IS NULL)))
INNER JOIN `relations` `relations` ON (`relations`.`targetId` = `elements`.`id`) AND ((`relations`.`sourceId`='467') AND (`relations`.`fieldId`='56')) AND ((`relations`.`sourceSiteId` IS NULL) OR (`relations`.`sourceSiteId`='1'))
WHERE (`elements`.`archived`=FALSE) AND (`elements`.`dateDeleted` IS NULL) AND (`elements`.`draftId` IS NULL) AND (`elements`.`revisionId` IS NULL) AND (`elements_sites`.`id` = (SELECT `elements_sites`.`id`
FROM `elements` `subElements`
INNER JOIN `entries` `entries` ON `entries`.`id` = `subElements`.`id`
INNER JOIN `elements_sites` `elements_sites` ON `elements_sites`.`elementId` = `subElements`.`id`
INNER JOIN `content` `content` ON (`content`.`elementId` = `subElements`.`id`) AND (`content`.`siteId` = `elements_sites`.`siteId`)
LEFT JOIN `structureelements` `structureelements` ON (`structureelements`.`elementId` = `subElements`.`id`) AND (EXISTS (SELECT *
FROM `structures`
WHERE (`id` = `structureelements`.`structureId`) AND (`dateDeleted` IS NULL)))
INNER JOIN `relations` `relations` ON (`relations`.`targetId` = `subElements`.`id`) AND ((`relations`.`sourceId`='467') AND (`relations`.`fieldId`='56')) AND ((`relations`.`sourceSiteId` IS NULL) OR (`relations`.`sourceSiteId`='1'))
WHERE (`subElements`.`archived`=FALSE) AND (`subElements`.`dateDeleted` IS NULL) AND (`subElements`.`draftId` IS NULL) AND (`subElements`.`revisionId` IS NULL) AND (`subElements`.`id` = `elements`.`id`)
ORDER BY case when `elements_sites`.`siteId` = 1 then 0 else 1 end, `elements_sites`.`id`
LIMIT 1))
ORDER BY `relations`.`sortOrder`
LIMIT 1) `subquery`
INNER JOIN `entries` `entries` ON `entries`.`id` = `subquery`.`elementsId`
INNER JOIN `elements` `elements` ON `elements`.`id` = `subquery`.`elementsId`
INNER JOIN `elements_sites` `elements_sites` ON `elements_sites`.`id` = `subquery`.`elementsSitesId`
INNER JOIN `content` `content` ON `content`.`id` = `subquery`.`contentId`
LEFT JOIN `structureelements` `structureelements` ON (`structureelements`.`elementId` = `subquery`.`elementsId`) AND (`structureelements`.`structureId` = `subquery`.`structureId`)
INNER JOIN `relations` `relations` ON (`relations`.`targetId` = `elements`.`id`) AND ((`relations`.`sourceId`='467') AND (`relations`.`fieldId`='56')) AND ((`relations`.`sourceSiteId` IS NULL) OR (`relations`.`sourceSiteId`='1'))
ORDER BY `relations`.`sortOrder`
2019-08-12 03:00:19 [-][1][-][error][yii\base\ErrorException:8] yii\base\ErrorException: Array to string conversion in C:\customer\customer_automasjon_craft_hyperlane\vendor\wrav\oembed\src\models\OembedModel.php:49
Stack trace:
#0 C:\customer\customer_automasjon_craft_hyperlane\vendor\craftcms\cms\src\helpers\StringHelper.php(762): wrav\oembed\models\OembedModel->__toString()
#1 C:\customer\customer_automasjon_craft_hyperlane\vendor\craftcms\cms\src\base\Field.php(378): craft\helpers\StringHelper::toString()
#2 C:\customer\customer_automasjon_craft_hyperlane\vendor\spicyweb\craft-neo\src\services\Blocks.php(67): wrav\oembed\fields\OembedField->getSearchKeywords()
#3 C:\customer\customer_automasjon_craft_hyperlane\vendor\spicyweb\craft-neo\src\Field.php(552): benf\neo\services\Blocks->getSearchKeywords()
#4 C:\customer\customer_automasjon_craft_hyperlane\vendor\craftcms\cms\src\services\Search.php(134): benf\neo\Field->getSearchKeywords()
#5 C:\customer\customer_automasjon_craft_hyperlane\vendor\craftcms\cms\src\queue\jobs\UpdateSearchIndex.php(55): craft\services\Search->indexElementAttributes()
#6 C:\customer\customer_automasjon_craft_hyperlane\vendor\yiisoft\yii2-queue\src\Queue.php(214): craft\queue\jobs\UpdateSearchIndex->execute()
#7 C:\customer\customer_automasjon_craft_hyperlane\vendor\yiisoft\yii2-queue\src\cli\Queue.php(147): craft\queue\Queue->handleMessage()
#8 C:\customer\customer_automasjon_craft_hyperlane\vendor\craftcms\cms\src\queue\Queue.php(96): craft\queue\Queue->handleMessage()
#9 C:\customer\customer_automasjon_craft_hyperlane\vendor\craftcms\cms\src\controllers\QueueController.php(86): craft\queue\Queue->run()
#10 C:\customer\customer_automasjon_craft_hyperlane\vendor\yiisoft\yii2\base\InlineAction.php(57): craft\controllers\QueueController->actionRun()
#11 C:\customer\customer_automasjon_craft_hyperlane\vendor\yiisoft\yii2\base\InlineAction.php(57): ::call_user_func_array:{C:\customer\customer_automasjon_craft_hyperlane\vendor\yiisoft\yii2\base\InlineAction.php:57}()
#12 C:\customer\customer_automasjon_craft_hyperlane\vendor\yiisoft\yii2\base\Controller.php(157): yii\base\InlineAction->runWithParams()
#13 C:\customer\customer_automasjon_craft_hyperlane\vendor\craftcms\cms\src\web\Controller.php(187): craft\controllers\QueueController->runAction()
#14 C:\customer\customer_automasjon_craft_hyperlane\vendor\yiisoft\yii2\base\Module.php(528): craft\controllers\QueueController->runAction()
#15 C:\customer\customer_automasjon_craft_hyperlane\vendor\craftcms\cms\src\web\Application.php(299): craft\web\Application->runAction()
#16 C:\customer\customer_automasjon_craft_hyperlane\vendor\craftcms\cms\src\web\Application.php(566): craft\web\Application->runAction()
#17 C:\customer\customer_automasjon_craft_hyperlane\vendor\craftcms\cms\src\web\Application.php(278): craft\web\Application->_processActionRequest()
#18 C:\customer\customer_automasjon_craft_hyperlane\vendor\yiisoft\yii2\base\Application.php(386): craft\web\Application->handleRequest()
#19 C:\customer\customer_automasjon_craft_hyperlane\web\index.php(21): craft\web\Application->run()

The entries of this section are propagated with the option "Save entries to all sites enabled for this section"

Craft CMS Version: 3.2.9
oEmbed Version: 1.1.6
Neo Version: 2.4.2
Multisite: Yes, four sites.

@nitech
Copy link
Author

nitech commented Aug 12, 2019

It might have something to do with multisite. My Craft install has 4 sites. When I changed the field type from oEmbed to Plain Text, this is what the plain text contained: {"url":{"url":{"url":{"url":"https://www.youtube.com/watch?v=RvvF1BQyUHs"}}}}

Seems to me that the json is wrapped inside itself four times. However, when I have a look at the content table, I even find oEmbed fields wrapped 5 times in themselves.

@nitech
Copy link
Author

nitech commented Aug 12, 2019

When I manually fix the json-data in the database, this "wrapping" happens again immediately when I try to change propagation method on the said section.

I ended up changing oEmbed to a Plain Text field and fixing the data back to plain text by running the following SQLs

-- Detect wraps
SELECT field_videoUrl FROM customer_automasjon_craft.content  
where field_videoUrl like '{\"url\":{\"url\"%';

-- Remove 2x (just run this as many times as you believe you have duplicates/wraps)
update content set field_videoUrl = replace(field_videoUrl, '{\"url\":{\"url\":', '{\"url\":') 
where field_videoUrl like '{\"url\":{\"url\"%';
update content set field_videoUrl = replace(field_videoUrl, '}}', '}') 
where field_videoUrl like '%}}';

-- Convert all oEmbeds to plain text
update content set field_videoUrl = replace(field_videoUrl, '{\"url\":\"', '') 
where field_videoUrl like '{\"url\":%';
update content set field_videoUrl = replace(field_videoUrl, '\"}', '') 
where field_videoUrl like '%}';

After I had converted the fields to plaintext and removed traces of the JSON-wrapping, the queued jobs went green.

So this is a fix to make due without the oEmbed-field while we wait for a fix to the bug.

@reganlawton
Copy link
Member

@nitech I'm gonna look into this issue as I also run a multi-sites with the plugin and haven't come the issue yet but currently in the process of a migration to CraftCMS v3.2, which the issue might be happening.

@reganlawton
Copy link
Member

reganlawton commented Aug 14, 2019

@nitech I think this is an issue with the normalizeValue in the field. I might need to support recursion here.

reganlawton added a commit that referenced this issue Aug 14, 2019
… logs in Neo. Issue seems to be 5th+ level objects not being covered for the legacy hardcoded string <-> array check/ converting.
@reganlawton
Copy link
Member

@nitech can you try checking out the feature/recursive-bug branch in composer, using dev-feature/recursive-bug tag, to see if thats fixing the 5th+ level JSON values from not being converted. That should prevent the issue and stop the queue job failing.

If not let me know and I'll keep on it for you.

@nitech
Copy link
Author

nitech commented Aug 14, 2019

Thanks @reganlawton . I will check it when I have the possibility. Right now I am deep into another problem that occurred when upgrading Craft CMS to 3.2 (neo-field duplicated content problem at spicywebau/craft-neo#242)

When I have that sorted out, I will test oEmbed at the mentioned branch.

You asked about an URL for the site - but I see you've removed the question from your comment. Just tell me if you need anything more.

In the meanwhile, while I work on the issue with the Neo-field - If it helps you, I can give you a copy of the database. Just give me an email and it'll be on it's way.

@reganlawton
Copy link
Member

reganlawton commented Aug 14, 2019

I missed the Link in the above messages so amended my question. The note that you had 5 level deep objects kinda stood out and was I issue I believed I’d patched but must never had pushed. It also explains the array to string issue.

So I’m hoping the recursive function being, well recursive, should resolve it. I also have additional work for CraftCMS 3.2 future version coming that’ll add Unit Testing to the plugin which should help cover these issues in the future.

@reganlawton
Copy link
Member

@nitech Any luck testing this?

reganlawton added a commit that referenced this issue Sep 16, 2019
…feature via DOM manipulation. ([#14](#14))

- Array to string conversion bug due to lack of a recursive function. ([#17](#17))
@reganlawton
Copy link
Member

Deployed fix in v1.1.8

@nitech
Copy link
Author

nitech commented Sep 19, 2019

Sorry that I did not get to try it before you deployed. Great work Regan :-)

@reganlawton
Copy link
Member

Did it resolve your error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants