Title: foreach() error
Last modified: August 24, 2022

---

# foreach() error

 *  [flatrock](https://wordpress.org/support/users/flatrock/)
 * (@flatrock)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/foreach-error-5/)
 * I’m getting an error, Warning: Invalid argument supplied for foreach() ,when 
   on Dashboard > My Calendar. Also, I get “Sorry, you are not allowed to access
   this page.” errors when trying to Set Calendar Url.
 * Any suggestions? Thanks in advance,
    Pete
 * here’s the full message….
 *     ```
       Style Editor
       You do not have permission to customize styles on this site.
   
       Warning: Invalid argument supplied for foreach() in /home/customer/www/activeagingswampscott.com/public_html/wp-content/plugins/my-calendar/my-calendar-styles.php on line 238
       Accessible Color Combinations
       Variable
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fforeach-error-5%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Joe Dolson](https://wordpress.org/support/users/joedolson/)
 * (@joedolson)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/foreach-error-5/#post-15950743)
 * That sounds like the result of a bad installation; you may want to try reinstalling?
   It appears that you neither have the default options or the default permissions,
   which strongly suggests something went wrong during installation.
 *  Thread Starter [flatrock](https://wordpress.org/support/users/flatrock/)
 * (@flatrock)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/foreach-error-5/#post-15953667)
 * Deleted and re-installed, same issue persists.
 * any other suggestions?
    Thanks, Pete
 *  Thread Starter [flatrock](https://wordpress.org/support/users/flatrock/)
 * (@flatrock)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/foreach-error-5/#post-15953700)
 * turned off all plug-ins except for My Calendar, same results.
 * WP 6.0.1 running on Siteground server
 *  Thread Starter [flatrock](https://wordpress.org/support/users/flatrock/)
 * (@flatrock)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/foreach-error-5/#post-15954509)
 * Okay, I think I solved it. Installing via Plug-ins Dashboard failed three times,
   so I went to your site and download the .zip file and uploaded to install and
   looks like we’re in business!! All seems good now.
 * thank you
    Pete
 *  Plugin Author [Joe Dolson](https://wordpress.org/support/users/joedolson/)
 * (@joedolson)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/foreach-error-5/#post-15954537)
 * Well, that’s quite odd; the file downloaded from my site is the same version 
   that would come from the plug-ins dashboard; it’s very curious why you’d have
   a problem with the WordPress installer. But I’m glad you got it figured out!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘foreach() error’ is closed to new replies.

 * ![](https://ps.w.org/my-calendar/assets/icon-256x256.png?rev=1097576)
 * [My Calendar - Accessible Event Manager](https://wordpress.org/plugins/my-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/my-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/my-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/my-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/my-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/my-calendar/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Joe Dolson](https://wordpress.org/support/users/joedolson/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/foreach-error-5/#post-15954537)
 * Status: not resolved