-
Notifications
You must be signed in to change notification settings - Fork 12
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 with Events - Illegal string offset 'name' #36
Comments
I will get back to this probably on the next weekend. |
I couldn't reproduce your problem but I added checks to that code. Check if release 1.7.0 works better for you. |
I've got the same error with 1.7.0 after cache clean. I was able to make it work with the following change (from line 175):
And of course I used "place_name" in my template facebook.event.html.twig. |
I would like to understand the reason of this error... it is probably initialization was missing for those 2 keys. Could you try clean plugin code and just add these 2 lines. I can't understand why I am not getting error you are getting - probably something to do with PHP versions, module versions etc..
|
This solution doesn't work either. Maybe because it's initialized as a String and then we try to put an array inside... |
I had the same issue when I first starting using this. I believe it's caused by not having a place specified for the event. For example, if you're doing events at various locations (like a band or speaker) you'll always add the place. In my case I'm trying to show events happening at a single location (a bar or restaurant), they never need to add a location because all their events happen at their establishment. I'm not sure if it's the setting itself, or if it's because they're set to be the same - but it's something with that particular scenario. Commenting out the place call in facebook.php solves it - code below. I'm looking at this thread today because I'm updating and I have to update this code every time I update the plugin. Even if this doesn't have a quick solution, Is it possible to override facebook.php? Just curious, everything else works beautifully, great job, love this plugin. Comment out lines 273 to 285:
|
@cpfeifer Had the same exact issue, even though the events I was fetching do have location set (to the venue they're happening in). I commented the lines from your post and it works perfectly. Thanks! |
Hello,
I'm trying to use the Events on my site and have the following error:
An exception has been thrown during the rendering of a template ("Illegal string offset 'name'").
Line 275 of Facebook.php
$r[$start_at]['place']['name'] = $val->place->name;
Here is the Facebook page id for which I'm trying to get the events: 329002043817618
If I comment the lines 275 and 277, then the events are displayed on my page.
Do you know what can be the problem?
Thanks for the plugin and for your help.
The text was updated successfully, but these errors were encountered: