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

Illegal string offset #12

Closed
kaleidografik opened this issue Apr 20, 2018 · 12 comments
Closed

Illegal string offset #12

kaleidografik opened this issue Apr 20, 2018 · 12 comments
Assignees
Labels

Comments

@kaleidografik
Copy link

Hi, love the plugin.

I'm receiving the following error when returning a value form a colour swatch field:
Warning: Illegal string offset 'value' in /app/public/wp-content/plugins/acf-swatch-master/acf-swatch-v5.php on line 394

Is it possible to help debug?

Thanks.

@kaleidografik
Copy link
Author

Looks like this can be resolved by returning the array, rather than just the value. However, this seems like a bug so perhaps can be investigated for future releases.

@nickforddev nickforddev self-assigned this Apr 25, 2018
@nickforddev
Copy link
Owner

Thank you for reporting this. That makes sense, I'll see what I can do

@nickforddev
Copy link
Owner

I believe I've fixed the issue, would you mind testing it out (install via the git repository, master branch)? You should be able to return the value without issue now.

@kaleidografik
Copy link
Author

Hi Nick. Plugin updated and the error being printed on the page has disappeared, however the error still appears in the DOM.

@nickforddev
Copy link
Owner

Could you elaborate about the DOM issue? Is there a javascript error? Or something is not rendering properly? Thanks!

@mb79
Copy link

mb79 commented Nov 13, 2018

Hi Nick, great addon to ACF ! Same error for me when I don't choose to return result as an array. I see you fixed the problem on your GitHub repo but I'm using composer... Could you update your wpackagist repo please ? Thanks

@kaleidografik
Copy link
Author

Hey @nickforddesign - This still seems to be an issue, and in fact the plugin seems to only return the 'value', regardless of wether the return is set to be 'value', 'label' or 'both'. Do you have any suggestions of why this might be? Thanks.

@nickforddev
Copy link
Owner

@kaleidografik did you install the plugin via the repo or composer? i haven't touched this project in quite a while, happy to try to fix it though

@nickforddev
Copy link
Owner

@mb79 sorry it took a while, i pushed the newest release to packagist so you should be fine to use with composer, let me know https://packagist.org/packages/nickford/acf-swatch

@kaleidografik
Copy link
Author

kaleidografik commented Nov 29, 2018 via email

@mb79
Copy link

mb79 commented Nov 29, 2018

@mb79 sorry it took a while, i pushed the newest release to packagist so you should be fine to use with composer, let me know https://packagist.org/packages/nickford/acf-swatch

Thank you ! It's resolve in this Github repo and in the packagist repo https://packagist.org/packages/nickford/acf-swatch.

At the beginning, I found your plugin here : https://wordpress.org/plugins/acf-color-swatches/
As I usually do, I've search acf-color-swatches on wpackagist and I found this : https://wpackagist.org/search?q=acf-color-swatches&type=any&search=
And here is the issue, this two repos are not up to date (typo on tag version 2.0.6). That's why some users still have this issue even if you solve it in your Github repo.

One last thing, the plugin directory are not the same : acf-color-swatchesin wordpress.org and wpackagist and acf-swatch in packagist

@nickforddev
Copy link
Owner

@kaleidografik @mb79 Thank you for those details, that was really helpful.

I just set up an integration to make deploying to the Wordpress plugins store much easier, the 1.0.7 release is pending there right now. I have no idea what the 2.0.6 release was about, probably I messed up when I was trying to figure out how SVN works so I could publish to the plugins store.

Thank you both for your feedback and patience on this issue!

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

No branches or pull requests

3 participants