Home / Forums / DynamiX Support / Issues with Blog

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts

  • resonanthosting
    Participant

    Keep running into an issue with Blog Entires…

    Warning: Invalid argument supplied for foreach() in /home/content/93/8562693/html/wp-content/themes/DynamiX/blog.php on line 159

     

    I have a plugin I am using called "All-In-One Event Calendar" It creates its own "Post" Structure. All that is needed to make it work is to create Events and Declare which page is going to have the Calendar displayed. My 1st issue I had was I did not realize that I needed to use the Blog Template, after that the Calendar would display, but then it had a month calendar displayed before each blog post on the site. Luckly I only have 5.

    I then create an Event Category thinking I could just display 1 Category on that page, but when I went to the Calendar page, I selected the "Events" Category and Published. It is then when I see the Warning message above, but it still displays all 5 blog post with 5 calendar images before each.

    I also double checked the SettingsReadingPost Page is set to "-Select-".

    There was one point that this actually worked correctly, only frustrating part was that I had to create an empty Post with no Title, and select Blog Category on Calendar page. Then it would display correctly.

    If you have any input as to how to get around this error, I would be extremly grateful.

    FYI, last night I update wordpress to 3.3.1, updated Dynamix to 2.8.8, and have continued to update the plugin everytime there is a newer version, nothing seems to change the issues I am having with it.

    Andy
    Andy
    Keymaster

    Hi,

    Can you send over a link to your site please – that plugin should work fine with DynamiX as I've seen it working in the past. 


    resonanthosting
    Participant

    I sent you a PM, I think.. Cant tell if you got it thou.

    http://www.fishersofmentexas.com/news/calendar/?ai1ec_cat_ids=16,7

    Andy
    Andy
    Keymaster

    Hi,

    Try editing DynamiX/blog.php – find this block of code


    <?php if($DYN_archivecat) { // Selected Blog Categories

    foreach ($DYN_archivecat as $catlist) { // Get category ID Array

    $cats = $cats.",".$catlist;

    }

    }

    and change to


    <?php if($DYN_archivecat) { // Selected Blog Categories

    if(is_array($DYN_archivecat)) {

    foreach ($DYN_archivecat as $catlist) { // Get category ID Array

    $cats = $cats.",".$catlist;

    }

    } else {

    $cats = $DYN_archivecat;

    }

    }



    Let me know if that works. 

    resonanthosting
    Participant

    It did not work.. "Sorry but their aren't any post in this category yet" displays now…

    So I then went back into All-In-One Events settings and let it Create a Default Calendar page. When I view the page there is nothing on it, when I edit the page, it is not using the Blog Template but the default template.

    So I change it from Default to Blog, and update page… Now I have Calendar, but I once again have one after each blog post from all blog categories.

    Next I edit the Calendar page to only show the Event category. It comes up but with a PHP error, but I relized that it was pointing to the blog_backup file I left on the site. I then copied backup locally to MAC, Then I deleted it from FTP. Now only the edited blog.php page is present.

    I reset Calendar page to point to Blog template, and Events category.

    Now when I view page it says, "Sorry but their aren't any post in this category yet"

    I added a new Blog post in the Event Category to make sure it had data.

    Created a test page that points to Blog Template, and is viewing Event Category, "still says their aren't any post"

    I then went back and looked at my News page because it works, and I relized that i was using the shortcode of "Recent Post" so I did the same for test page, now Test pages shows Correct post with categories.

    So I added Same shortcode to Calendar page and left the category blank. It displayed Blog post from all categories, but no calendar image.

    I checked out the Readme.txt file for All-In-One and it states the following… * Your calendar can be embedded into a WordPress page without needing to create template files or modify the theme

    … however, I have never had it work with the default template on a page. I will keep researching, but here are my troubleshooting steps up to this point. So, it seems like I have 2 issues. One, the blog post by categories does not work on any page on the site, let alone the Calendar page, and 2 The Calendar has never worked with the Default template, and that is why I discovered the work around with a Blog template, but I can not restrict it to certain Categories.

    Also, here is a list of my plugins for troubleshooting. Perhaps one of them is interfering with the process.

    – All-In-One Event Calendar

    – amr-users

    – BackWPup

    – Bible Verse Display

    – cforms

    – Exec-PHP

    – GoGadget Weather

    – Login Logout

    – Pinterest

    – s2member

    – Simple Mail Address Encoder

    – WordPress Importer

    – WP Super Cache

    – WP Ultra Simple Paypal Cart

    Please let me know what else I need to do.

    Thanks,

    http://www.resonanthosting.com

    Andy
    Andy
    Keymaster

    The next thing I would try then is disable all plugins bar the All-in-one and see if that works, then add one-by-one. 

    I don't understand why it can't be added to a normal page though. 


    resonanthosting
    Participant

    Deactiving them will not lose any of their settings, correct? I'm kinda new to WP, cant afford to have downtime on site.

    On a side note, what about the Blog Template not working for me regardless of Calendar? Remember I setup a test page to use the Blog Template, and nothing would display unless I did it via shortcode.

    Thanks again for being quick to respond.

    Andy
    Andy
    Keymaster

    No the settings should be set within the database – as long as you don't delete the plugins and just 'de-activate' it will be fine. 

    The plugin should work without the Blog Template page, lets see what happens after de-activating the plugins. 


    resonanthosting
    Participant

    Tried all of that and I am back to square one.. Also, with the new line of code you sent me, it keeps displaying "Their are no post in the category to display". So I edited the blog.php code to read as it did prior to editing.

    Also, my news pages is doing the same thing.. and their is no calendar page associated with it..

    Warning: Invalid argument supplied for foreach() in /home/content/93/8562693/html/wp-content/themes/DynamiX/blog.php on line 160

    How I got it to work in the past was to use your shortcode for adding recent post.. 

    [recent_posts content="textimage" categories="news" image_effect="" undefined image_width="50" image_height="50"  image_align="alignleft"  order="date" orderby="ASC"  excerpt="15" limit="5"   /]

    Now I am trying to apply that same logic to the Calendar page.. 

    However, that did not work.

    What did kinda work was that I tried switching to different template "bbPress – Forum (Index)" gave me the calendar but gave me an error where the footer should physcally be. So, there seems to be something missing in the Default template. I'm going to compare them side by side and see whats what.


    resonanthosting
    Participant

    O yea… got it working..

    I took a copy of your page-front-forums.php file and created one called calendar-temp.php

    Removed line 43 changed the Template Name, and pointed Calendar page to the new Template.

    http://www.fishersofmentexas.com/news/calendar

    If this was my site I would try and tackle the Blog issue, but since I have a work around, I am happy.

    Regards

    Randy

    http://www.resonanthosting.com

    Andy
    Andy
    Keymaster

    Hi Randy,

    I'm glad you found a resolution – I'll need to spend a bit of time with the plugin to see why it would affect things like this. (Need more hours in a day..)

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.