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

Error relating to Assets which using entry preview #2502

Closed
tyssen opened this issue Nov 8, 2022 · 10 comments
Closed

Error relating to Assets which using entry preview #2502

tyssen opened this issue Nov 8, 2022 · 10 comments
Assignees

Comments

@tyssen
Copy link

tyssen commented Nov 8, 2022

When trying to preview an entry that has an Assets fieldtype, I get a couple of warnings:

Trying to access array offset on value of type null
user/addons/assets/ft.assets.php, line 1460

followed by:

array_filter(): Argument #1 ($array) must be of type array, null given
user/addons/assets/ft.assets.php:1486

#0 user/addons/assets/ft.assets.php(1486): array_filter()
#1 user/addons/matrix/ft.matrix.php(3091): Assets_ft->pre_process()
#2 user/addons/matrix/ext.matrix.php(170): Matrix_ft->replace_tag()
#3 [internal function]: Matrix_ext->_parse_tag_pair()
#4 user/addons/matrix/ext.matrix.php(94): preg_replace_callback()
#5 ee/legacy/libraries/Extensions.php(203): Matrix_ext->channel_entries_tagdata()
#6 ee/legacy/libraries/Extensions.php(108): EE_Extensions->call_class()
#7 ee/ExpressionEngine/Addons/channel/mod.channel.php(2569): EE_Extensions->call()
#8 ee/legacy/libraries/channel_entries_parser/Parser.php(235): Channel->callback_tagdata_loop_start()
#9 ee/legacy/libraries/Channel_entries_parser.php(172): EE_Channel_data_parser->parse()
#10 ee/ExpressionEngine/Addons/channel/mod.channel.php(2489): EE_Channel_parser->parse()
#11 ee/ExpressionEngine/Addons/channel/mod.channel.php(257): Channel->parse_channel_entries()
#12 ee/legacy/libraries/Template.php(1793): Channel->entries()
#13 user/addons/stash/mod.stash.php(4327): EE_Template->process_tags()
#14 user/addons/stash/mod.stash.php(4523): Stash->_parse_sub_template()
#15 user/addons/stash/mod.stash.php(1101): Stash->_parse_output()
#16 user/addons/stash/ext.stash.php(453): Stash->get()
#17 user/addons/stash/ext.stash.php(342): Stash_ext->template_post_parse()
#18 ee/legacy/libraries/Extensions.php(203): Stash_ext->stash_post_parse()
#19 ee/legacy/libraries/Extensions.php(108): EE_Extensions->call_class()
#20 user/addons/stash/mod.stash.php(4380): EE_Extensions->call()
#21 user/addons/stash/mod.stash.php(4348): Stash->_parse_sub_template()
#22 user/addons/stash/mod.stash.php(4523): Stash->_parse_sub_template()
#23 user/addons/stash/mod.stash.php(1101): Stash->_parse_output()
#24 user/addons/stash/ext.stash.php(453): Stash->get()
#25 ee/legacy/libraries/Extensions.php(203): Stash_ext->template_post_parse()
#26 ee/legacy/libraries/Extensions.php(108): EE_Extensions->call_class()
#27 ee/legacy/libraries/Template.php(260): EE_Extensions->call()
#28 ee/legacy/libraries/Template.php(171): EE_Template->fetch_and_parse()
#29 ee/ExpressionEngine/Service/LivePreview/LivePreview.php(208): EE_Template->run_template_engine()
#30 ee/ExpressionEngine/Addons/channel/mod.channel.php(5217): ExpressionEngine\Service\LivePreview\LivePreview->preview()
#31 ee/legacy/libraries/Actions.php(175): Channel->live_preview()
#32 ee/legacy/libraries/Core.php(665): EE_Actions->__construct()
#33 ee/legacy/controllers/ee.php(51): EE_Core->generate_action()
#34 [internal function]: EE->index()
#35 ee/ExpressionEngine/Core/Core.php(268): call_user_func_array()
#36 ee/ExpressionEngine/Core/Core.php(124): ExpressionEngine\Core\Core->runController()
#37 ee/ExpressionEngine/Boot/boot.php(184): ExpressionEngine\Core\Core->run()
#38 public_html/index.php(174): require_once('...')
#38 public_html/index.php(174): require_once('...') 

The site is running EE 7.1.6 with Assets 4.0.3.

@TomJaeger
Copy link
Contributor

@tyssen Thanks for getting in touch about this. Unfortunately version 4.0.3 doesn't' support EE 7. I'd recommend upgrading to the most recent version. I believe from there you should be in good shape!

(It also looks there's been additional live preview items addressed in Assets since 4.0.3)

https://eeharbor.com/assets/changelog

@tyssen
Copy link
Author

tyssen commented Nov 10, 2022

@TomJaeger The reason Assets hasn't been updated is because it doesn't show as being available to update on the Add-ons updates tab. I've been operating under the assumption that all EE Harbor add-ons will show as updates being available in the control panel. Is that not the case?

@intoeetive
Copy link
Contributor

@tyssen the "updates" tab shows the available updates based on the files present. I.e. it will show you if you have newer add-on files, but did not run update script for it. It does no check anything remotely (yet!)

@tyssen
Copy link
Author

tyssen commented Nov 20, 2022

I've now upgraded to EE 7.2.0 and Assets 4.1.2 and still getting similar errors except now the first on the page is:

Undefined array key "field_id_560"
user/addons/assets/ft.assets.php, line 1464

Field with ID 560 exists but it's not used on the page that I'm trying to preview.

@intoeetive
Copy link
Contributor

@bakin1999 can you check this?

@intoeetive intoeetive reopened this Nov 21, 2022
@tyssen
Copy link
Author

tyssen commented Dec 30, 2022

Hi guys, could you let me know where things are up to with this, please?

@bakin1999
Copy link
Collaborator

bakin1999 commented Jan 3, 2023

@tyssen

What version of matrix are you on? I'm assuming that this assets field is also inside a matrix field? Have so far not been able to see this come up. Am using matrix 3.4.4

@tyssen
Copy link
Author

tyssen commented Jan 3, 2023

Matrix 3.4.4 is installed but it's not in use on the page that is causing the problem. Instead, we're using Bloqs for repeating content. There is also a Fluid field on the page which for the most part isn't used. It's the legacy repeating content field from before Bloqs was introduced.

@bakin1999
Copy link
Collaborator

Sent over a fix on slack that you can try out, if it ends out working we will also have in next assets release

@TomJaeger
Copy link
Contributor

Going to close this one out as conversation has moved to slack and it isn't an EE Core issue.

If need be, please feel free to re open.

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

4 participants