Forums

Sero Theme Events/New Problems (32 posts)

  1. scottgreening
    Member
    Posted 4 months ago #

    I am using the Sero theme. I recently upgraded to 2.8 and the Events and News portions of the sidebar are now causing problems. All posts show up in the news tab. Nothing appears in the Events tab. In the Sero Theme setup section there are no longer any items in the drop down menu for either the new or events setup. Any help would be appreciated.

  2. Mitchellrw
    Member
    Posted 4 months ago #

    Hey Scott! (actually I went to school w/brooke)
    I'm having the same problem. w/my site. www.slaterbaptistchurch.org
    any help anyone could give would be much appreciated! Thanks!
    -Will

  3. simon.carter
    Member
    Posted 4 months ago #

    Same problem here - I installed with WP 2.8 - and it has never worked. My posts to Aaron - the theme developer - sit awaiting moderation for weeks...

    I am thinking it is sopmething in the upgrade interfering with the feed...

    It couldn't be something daft like the date formats... could it?/????

    Any help would be most welcome... and if I find anything, I will post here.
    -Simon

  4. simon.carter
    Member
    Posted 4 months ago #

    I ran the query in the function get_upcomping_events() directly against the database, and got the following error:

    #1054 - Unknown column '$sero_events_id' in 'where clause'

    That narrows it down a bit.

    BTW - I have 4 MySQL databases running in this domain... But I don't think that is the problem.

  5. simon.carter
    Member
    Posted 4 months ago #

    Here is the full result from running the query...

    Error

    SQL query: Documentation

    SELECT DISTINCT *
    FROM wp_posts AS posts
    LEFT JOIN wp_term_relationships ON ( posts.ID = wp_term_relationships.object_id )
    LEFT JOIN wp_term_taxonomy ON ( wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id )
    WHERE 1 =1
    AND wp_term_taxonomy.taxonomy = 'category'
    AND wp_term_taxonomy.term_id
    IN (
    $sero_events_id
    )
    AND (
    posts.post_status = 'publish'
    OR posts.post_status = 'future'
    )
    AND (
    posts.post_type = 'post'
    )
    AND posts.post_password = ''
    AND (
    posts.post_date >= NOW( )
    )
    GROUP BY posts.ID
    ORDER BY posts.post_date ASC
    LIMIT 0

    MySQL said: Documentation
    #1054 - Unknown column '$sero_events_id' in 'where clause'

    I am improvising here! $sero_events_id is a php variable... so I am tracing that... and will replace it in the query with a value... or just delete the clause.

  6. reachone.internet
    Member
    Posted 4 months ago #

    Anyone have any luck finding a solution for this?

    Also, under the Sero Theme admin page the News & Events categories don’t show up under Main Navigation, Footer Navigation, nor The 3 Big Links. So I am unable to select those to show up in the navigation areas.

  7. simon.carter
    Member
    Posted 4 months ago #

    I examined the MySQL database and found that the term_id for the Events category was 10, in my database. (That all depends on the order in which you create categories!

    I re-ran the query directly against the database, insertingthe value 10 as follows:

    SELECT DISTINCT *
    FROM wp_posts AS posts
    LEFT JOIN wp_term_relationships ON ( posts.ID = wp_term_relationships.object_id )
    LEFT JOIN wp_term_taxonomy ON ( wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id )
    WHERE 1 =1
    AND wp_term_taxonomy.taxonomy = 'category'

    AND wp_term_taxonomy.term_id = 10 // This is the clause I changed//

    AND (
    posts.post_status = 'publish'
    OR posts.post_status = 'future'
    )
    AND (
    posts.post_type = 'post'
    )
    AND posts.post_password = ''
    AND (
    posts.post_date >= NOW( )
    )
    GROUP BY posts.ID
    ORDER BY posts.post_date ASC
    LIMIT 0

    The result of this was the information that no rows were found. There is clearly something wrong in this query - it should deliver one row of data in my database - since I have one future event in the Events category.

    I am now dissecting teh query clause by clause. Will keep you "posted".
    By the way, right now, ALL my posts only seem to go to the News tab - and nowhere else! Hmmm... I might have to raid another theme for code that works!

    Simon Carter
    Leaphrog Design
    www.leaphrog.co.uk

  8. scottgreening
    Member
    Posted 4 months ago #

    Simon,

    Thanks for your work! I'm a little out of my element when it comes to the intricacies of php coding. Anything beyond the basics and I am lost. I'll be anxious to see the results of your efforts. Thanks again.

    Scott

  9. simon.carter
    Member
    Posted 4 months ago #

    I now find that actually NO posts are posting correctly....
    so I am going to pull this SQL query down to basics to see which part does not work...

    I am recording this all here partly for myself... so don't worry if you don't get what I am doing... because neiother do I! Haha

  10. simon.carter
    Member
    Posted 4 months ago #

    The query works fine until the LAST LINE which limits the number of returned records to a maximum of ... wait for it... 0!

    Working on solution and testing it, now.

  11. simon.carter
    Member
    Posted 4 months ago #

    OK - The EVENTS part is working now... although it is a clumsy fix... because I think there is a backend problem - for example, when I set which category to feed to NEWS and EVENTS, there is nothing appearing in the drop-downs... so THAT is where the real problem is.

    The work-around is good, as long as you know what is the

      term_id
    for the Events category (In MY database, it is 10)

    From the WP Dashboard... select >Appearance>Editor
    on the right side choose the Theme Functions (functions.php).

    Scroll down to line 185, which is in the function get_upcoming_events().

    ************ IMPORTANT***********************************************
    COPY the whole line to Notepad or somewhere as a back-up, in case you need to restore it!
    *********************************************************************
    Did you do the above? If not... GO BACK AND DO IT NOW!

    This line creates an SQL query in the form of a text string... and assigns it to a variable called $query. It is a very long line.... You need to find the section that says...
    AND wp_term_taxonomy.taxonomy = 'category'
    AND wp_term_taxonomy.term_id
    IN (
    $sero_events_id
    )

    and change it to:

    AND wp_term_taxonomy.taxonomy = 'category'
    AND wp_term_taxonomy.term_id
    = 10

    or - whatever your particular EVENTS category term_id IS (Mine is 10)

    Next, go to the END of the same line... to the expression...

    LIMIT 0

    and change it to:

    LIMIT 0, 5 This allows up to 5 future events to be displayed... in the EVENTS tab. You can make it any number you like...

    NOW, I still have ALL posts appearing on the NEWS tab... so I will work on making that just display the NEWS category...

    I will use the same code as the amended code above, but change the category_id to the NEWS category ID... and set it to show the five most recent PAST events. I will document that later.

  12. simon.carter
    Member
    Posted 4 months ago #

    If anyone is following all of this... please DO NOT IMPLEMENT what I have documented so far.

    It IS a work-around, and has helped me to understand the true problem, which is on the SERO THEME SETTINGS page under NEWS & EVENTS. Data is not being correctly transferred between the database Categories and the drop-down boxes, or from the max limit settings... as a result, the VARIABLES which are after supposed to hold these settings are empty.

    My work-around placed the values directly into the query without requiring the variables, BUT a more complete fix is to fix the original problem.

    Sorry if I am cluttering up this post topic... if anyone really wants me to stop - or wants to take the problem on from here on their own, I hope they find my comments useful.

    Otherwise, I will just continue. I hope for a fix within two or three days.

  13. scottgreening
    Member
    Posted 4 months ago #

    Simon,

    Again thank you. I continue to follow and appreciate your work!

    Scott

  14. simon.carter
    Member
    Posted 3 months ago #

    OK Scott....

    Good and bad news...

    I DOWNGRADED Wordpress for this site to 2.7.1 using the instructions at http://techie-buzz.com/wordpress/downgrade-uninstall-wordpress-28.html

    I then found that the NEWS category works ok - but still the same problem with the Events category...

    Can I ask, which version of Wordpress were you using when it all worked OK?

    Currently, the whole Church Web Developer site seems to have been taken offline - which does not give me confidence that Sero will be upgraded any time soon!

    I am going to try making the changes I noted above to get the Events Tab working... in conjunction with the downgrade to make the News tab work - and I may have a working site... Assuming normal posts will go where I want them to!

  15. simon.carter
    Member
    Posted 3 months ago #

    OK - NOW my site works using the EVENTS and NEWS tabs as they should work.
    Problems still, in that I cannot get any OTHER posts to appear - but this does not matter to me, since this site is fairly static (except for NEWS and EVENTS).
    ****************
    Solution Stage 1:

    DOWNGRADE Wordpress installation to version 7.2.1, using the instructions at: http://techie-buzz.com/wordpress/downgrade-uninstall-wordpress-28.html

    This will allow you to configure the NEWS category correctly in the Admin page. The EVENTS drop-down is still blank.

    DO NOT BE ALARMED when you have completed your downgrade, if Wordpress tells you you have to UPGRADE your admin pages when you log in to Admin. This is ok - it is only the Admin zone that is upgraded again, and the back-end is still 7.2.1 (You will see this at the top of the admin screen where you are continuously prompted to upgrade to 8.2.1. Learn to live with it!

    The zipped backup of my database needed to be UNZIPPED before it was successfully re-uploaded and imported.

    *****************
    Solution Stage 2:

    You need to find the term_id for the Events category. You cannot set it using the Admin tools, because it is not working, so you have to do it manually.

    Your EVENTS category has a "term_id" which you will need. It is an integer number probably between 1 and however many categories you have made (ever). You can use trial and error here - OR go into the database using PhpMyAdmin and look in the table wp_term_taxonomy which contains this field.

    *****************
    Solution Stage 3:

    Get the EVENTS tag working by editing the file function.php (THEME FUNCTIONS) under APPEARANCE > EDITOR. Scroll down to line 185 (although the line numbers in 2.7.1 have now disappeared!!!!) so you can search )(find) the comment line... //Get events

    Beneath it you will find the code for the function get_upcoming_events().

    It is the line beginning with "$query" that you need to edit. It contains the expression:

    WHERE 1 =1
    AND wp_term_taxonomy.taxonomy = 'category'
    AND wp_term_taxonomy.term_id
    IN (
    $sero_events_id
    )

    My term_id for Events category was 10, so I changed the expression above to:

    WHERE 1 =1
    AND wp_term_taxonomy.taxonomy = 'category'
    AND wp_term_taxonomy.term_id
    = 10

    *****************
    My News and Events tabs now both work as expected.

    Hope it helps.

    If you have difficulties with any of this, let me know if you need more detail.

    ********************************************************************

    I can walk you through the database bits if you need help but probably need to fix a time for real-time chat for this. I used PhpMyAdmin, through the C Panel interface of my hosting company. I had not don it before - although I know databases quite well. "But screw (y)our courage to the sticking place and (you)'ll not fail!) (Macbeth)(-ish)

  16. scottgreening
    Member
    Posted 3 months ago #

    Simon,

    I got it to work. I had to manually adjust the sidebar code to tell the theme what category news was supposed to be (everything was showing up). It looks like everything is good now! Thanks for your help.

    Scott

  17. simon.carter
    Member
    Posted 3 months ago #

    Good job! Well done!

  18. simon.carter
    Member
    Posted 3 months ago #

    My ULTIMATE solution
    ********************

    NO code changes in PHP required....

    The problem is in the database: There need to be FOUR records in the table called wp_options.
    491 0 sero_events_id 10 yes
    165 0 sero_events_limit 7 yes
    162 0 sero_news_id 11 yes
    163 0 sero_news_limit 7 yes

    The first column contains unique IDs - just use IDs that have not been used yet.

    The 4th column contains the term_id from the wp_term_taxonomy table for EVENTS (10 in my case) and NEWS (11 in my case). The two 7s represent the limit of posts to be displayed. Set to what you like.

    Upgrading back to WordPress 2.8.1 still allowed the EVENTS and NEWS tabs to work correctly... and all the PHP code to remain unaffected.

    :)

    I am very happy about this solution. It is better than my work-arounds above - in that ... it is a better work-around! Haha.

  19. Mitchellrw
    Member
    Posted 3 months ago #

    Simon, I have been waiting for an "ultimate solution." I'm glad to see you found one but now I need a little help implementing it.

    where do I go to edit the wp_options table? Is that in the main wordpress folder? do I update it then FTP it over.. I'm totally new at this and I don't want to have to change themes, so any help you can give would be appreciated. thanks.

  20. Mitchellrw
    Member
    Posted 3 months ago #

    ok so I've been playing around and I assume now that it has to be updated in MySql but I don't know how to add to it and i'm a little scared I'll mess it up. can you give me or point to me detailed instructions on doing this. thanks.

  21. simon.carter
    Member
    Posted 3 months ago #

    Hi Mitchellrw
    Just one or two questions so I can give the the correct advice:

    Are you using PhpMyAdmin?
    Are you doing this via a C-Panel with your hosting company?

    Let me know and I will see what advice I can give.

    Cheers
    Simon
    http://www.leaphrog.co.uk

  22. tiguemon
    Member
    Posted 3 months ago #

    Hi Simon,

    I have been following the thread too as I am having the same issue. I know enough to be dangerous but not enough to go straight into your fix. I am on WordPress 2.8.1, using PhpMyAdmin, via Plesk (not c-panel). I can get to PhpMyAdmin but need advice on editing.

    Thanks,

    Tigue

  23. tiguemon
    Member
    Posted 3 months ago #

    Ok, I have verified all 4 records are in the database correctly, I deleted and re-added the events catagory and the database updated the term_id correctly. I went ahead and modified the php also to see what happened... still no events. I have found that if I include a category widget in the optional sidebar, the events category is visible but always empty when clicked. The posts show up fine in the default theme under that category. Any advice?

  24. Mitchellrw
    Member
    Posted 3 months ago #

    I am working through my hosting company (1and1)
    I go to "mysql admin" then click "phpmyadmin" next to the mysql database which lets me edit on "phpmyadmin.1and1.com"
    That's about all I know. I see "wp_options" listed as the 3rd option down. and it gives me options to "browse, structure, search, insert, etc"

    This is where I get stuck. Hope that helps.

    Thanks,
    Will

  25. dane_gay
    Member
    Posted 3 months ago #

    Thank you very much for your help. I was having the same problem, but using your notes I fixed the problem. I've never administrated a mySQL database before but figured it out in about 10 minutes.
    If this helps anyone, here's what I did:
    I'm using cPanel on lunarpages webhost...
    1. clicked on MySQL Databases icon
    2. clicked on phpMYADMIN at the bottom of the page
    3. clicked on "databases"
    4. clicked on the link for my wordpress database (it will be named whatever you created)
    5. clicked on wp_term_taxonomy and looked for category descriptions of News and Events (note: I had to go back into my website and add the description to News and Events so I could identify them here). Wrote down the term_id
    6. clicked on wp_options (left side of phpMyAdmin page for me) and then clicked Browse link and looked page by page until I found the sero_news_id and sero_events_id mentioned by simon.carter. I found that I only needed to add the actual term_id, save, and voila! Everything works again.
    To add the term_id I simply clicked on the pencil icon (edit) to the left of each _id and filled in the term_id number in the blank box and saved.

    Thank you for all your work on this simon.carter. Very much appreciated.

    Dane
    webservant- Calvary Chapel of Richmond
    www.calvarychapelofrichmond.com

  26. simon.carter
    Member
    Posted 3 months ago #

    Thanks Dane - I think you saved me some work here (Nice to compare your site with my client's, BTW! Good work!).

    Will - is Dane's advice enough for you or do you need more?

    Tiguemon - Can I have the URL of your site to see where you are, at the moment? You seem to have created an Events Category ok - but you don't mention assigning the Events Category term_id to the Events Tab... When I see your site, maybe we can take it from there.

    :)
    Simon
    Leaphrog Design
    http://www.leaphrog.co.uk

  27. Mitchellrw
    Member
    Posted 3 months ago #

    Got it! Thanks so much guys!

    BTW, I know this should go in a different thread but have any of you had any trouble w/the image carousel not working?

  28. simon.carter
    Member
    Posted 3 months ago #

    I know you don't want to hear this... but... nope - it has always been about the only thing in the theme that HAS worked well.

    By the way, did anyone notice the support site for the Sero theme disappearing from the Internet last week - and the subscription was paid until November!... Hmmm.

    Are your images all the correct size? Try loading them only two at a time to see if one of them is causing prob!

    Just Tiguemon to be unstuck now... :)

    It's nice to be useful. Kinda like payback for having a free theme!

  29. Mitchellrw
    Member
    Posted 3 months ago #

    I can't even display the "sample" images that are included in the theme. I tried reinstalling the theme but that didn't work either. The footer images work.

    Yeah I don't know what's up w/him taking the site down. The owner's name is Aaron Robbins. He hasn't updated his blog since December ( www.aaronrobbins.com ) still updates his twitter though ( http://twitter.com/aaronrobbins ) and no, I'm not stocking him, I just went looking for info on what happened to Sero. I didn't find any
    Maybe he is like a lot of creative types and just has a short attention span?

  30. dane_gay
    Member
    Posted 3 months ago #

    Anyone know how to modify the tabs on the main page to dynamic tabs (I need to have drop down lists for each tab)

    Thanks,

    Dane

Reply »

You must log in to post.

About this Topic