WordPress.org

Forums

Writr
[resolved] Homepage doesn't show widgets, error in custom header (24 posts)

  1. tomjkt
    Member
    Posted 12 months ago #

    Hi,
    on my homepage themadbeanjakarta.com the widgets (e.g. Recent Posts) are not displayed anymore and I receive an error message, when I use the customize theme menu:
    Warning: Invalid argument supplied for foreach() in /home.../../custom-header.php on line 1248
    Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/.../custom-header.php on line 1268

    I deactivated all plugins (jetpack, superwpcache) still the error displays and the content of widgets is not shown on the front page.
    Any idea what happened?
    Thank you!

  2. Kathryn
    Automattic Happiness Engineer
    Posted 12 months ago #

    I'm not seeing a site at that URL, is it down?

    If you switch to a default theme temporarily like Twenty Fourteen, does the problem persist? If so, this isn't a theme issue and you'll need to debug your WordPress install further. Let me know.

  3. tomjkt
    Member
    Posted 12 months ago #

    Hi Kathryn,

    no, the site is not down. Please try again: themadbeanjakarta.com

    Will do as you say and come back.
    Thank you!

  4. tomjkt
    Member
    Posted 12 months ago #

    Hi Kathryn,

    I switched to twelve-thirteen and everything is displaying on the homepage as intended (Upcoming Events, Recent Posts, Subscribe, Search, and the social buttons).
    These widgets are not displayed on the homepage with writr. Only if one of the pages is clicked, the widgets will display. Also the error message will pop up, when customizing the theme.
    Would you like to have a look 'inside'?

    Best,
    Thomas

  5. Kathryn
    Automattic Happiness Engineer
    Posted 12 months ago #

    Hi Thomas, I can see the site now.

    Have you made any modifications at all to the theme files?

    Could you try downloading and installing a fresh copy from here?
    http://wordpress.org/themes/writr

    For the safest results, first remove all the old theme files from your server manually, via FTP.

    Then install the theme manually via FTP.

    Let me know how it goes.

  6. tomjkt
    Member
    Posted 11 months ago #

    Hi Kathryn,
    I did like you advised and installed a fresh theme copy via ftp, but to no avail. All plugins have been deactivated and the theme files have not been edited. Still, on the frontpage no widgets are displayed.
    Can't find out what happens.
    Hope you have some ideas what to do now.
    Best,
    Thomas

  7. Kathryn
    Automattic Happiness Engineer
    Posted 11 months ago #

    Hi Thomas, I can't think why that would be happening. I just activated Writr 1.0.8 on my test site with WordPress 3.9 and widgets are displaying correctly on the front page.

    All plugins have been deactivated

    I'm seeing many plugins active on your site currently - did you reactivate them all already?

  8. tomjkt
    Member
    Posted 11 months ago #

    Hi Kathryn,

    yes I reactivated the plugins again, since it didn't change anything to deactivate them.
    I deactivate them now (just Akismet is running) so you might have a look yourself.

    Best,
    Thomas

  9. Kathryn
    Automattic Happiness Engineer
    Posted 11 months ago #

    Thanks, I see it. I'm a bit mystified by this one.

    Would you mind taking a screenshot of your widgets page just in case it provides some clues?

    Here's a guide on how to make a screenshot, if you're not sure: http://en.support.wordpress.com/make-a-screenshot/

    You can upload the screenshot - in a graphic format like JPG, PNG, or PDF - in your Media Library, and provide a link so I can see it, or upload it with a service like Droplr or Imgur.

  10. Kathryn
    Automattic Happiness Engineer
    Posted 11 months ago #

    By "your widgets page" I mean your dashboard area, under Appearance > Widgets.

  11. tomjkt
    Member
    Posted 11 months ago #

    Hi Kathryn,

    you will find the screenshot here.

    Best,
    Thomas

  12. Kathryn
    Automattic Happiness Engineer
    Posted 11 months ago #

    Thanks. The only other thing I can think of is that your copy of the WordPress core files are corrupt somehow, or that the install didn't complete properly. That might explain the Customizer error as well. You might want to try a manual reinstall of the core WordPress files, while being sure to follow proper backup procedures - and please be extremely careful not to overwrite your wp-content folder, .htaccess, or any other files you've modified.

    http://codex.wordpress.org/Updating_WordPress#Manual_Update

  13. stormbolter
    Member
    Posted 11 months ago #

    Hello! I'm currently having the same problem. It's a clean installation from the spanish version of wordpress (just downloaded from https://es.wordpress.org).

    The invalid argument supplied for the foreach() in line 1248 is that $this -> default_headers = NULL, while it expected an array. Why is that, well, I'm not that proficient with wordpress ;)

    As far as I can see, writr is returning the correct string (a gravatar URL containing an image). Maybe wordpress expect writr to define also the $this->default_headers?

  14. stormbolter
    Member
    Posted 11 months ago #

    My last trace takes me to the custom-header function in writr, the one that changes the header in personalize theme. Removing the file contents makes the errors disappear.

    The version I have is the latest, and yes, I downloaded a clean version to check out ;)

  15. designsimply
    Member
    Posted 11 months ago #

    stormbolter, just to make sure, do you have any plugins installed which could be causing the trouble? Also, if you switch to the default Twenty Fourteen theme, does the problem go away? These are good first, basic troubleshooting steps to check, and if those steps don't surface anything useful, let me know and I'll try digging in and testing for you. One thought: could the es files have something wrong with them by chance?

  16. stormbolter
    Member
    Posted 11 months ago #

    I have only Jetpack installed (although later I installed other plugins, the problem, as far as I know, was already present with Jetpack); switching to Twenty Fourteen resolve my problem. Disabling Jetpack (or any other plugin) does nothing to remove the error.

    In fact, at first I suspected that maybe WP Editor (a plugin that overhauls the theme editor to be more useful) was the culprit so I tried a clean instalation without WP Editor. The other plugin installed is Text Hover (a simple plugin that does text replacement on the posts to add ABBR tags).

    In my case I don't have problems with sidebar widgets, only I'm annoyed by the php error in the "customize theme" section.

    As I told before, removing the custom-header.php in writr theme solves the problem without breaking anything, but I assume it does something nice that probably I should like to see!

  17. stormbolter
    Member
    Posted 11 months ago #

    I'm glad to report that upgrading to the 3.9.1 (from 3.9.0) solved the problem.

  18. designsimply
    Member
    Posted 11 months ago #

    I'm glad to report that upgrading to the 3.9.1 (from 3.9.0) solved the problem.

    Very good! Thanks for following up to note that!

  19. tomjkt
    Member
    Posted 11 months ago #

    I cannot find any custom-header.php in my writr theme. Would like to delete it and try out whether this solves my problem as well.

  20. tomjkt
    Member
    Posted 11 months ago #

    Found it in the folder Inc and deleted it. Then the whole theme is broken and only the error message as described above appears. Maybe I read the comment of stormbolter wrong and I have only to delete the content of the file, not the file itself. Will try this.

  21. tomjkt
    Member
    Posted 11 months ago #

    Does not help.
    I guess, I give up.
    Something is definitely wrong with the theme, my WP installation is brand new, I deleted and installed the theme again, and it still does not display the widgets on the front page.
    I tried to force to show the widgets by using Jetpack's Widget Visibility plugin to no avail as well. What else should I do? Writr is a rather simple theme which actually should run flawlessly. What a pity it doesn't.

  22. Kathryn
    Automattic Happiness Engineer
    Posted 10 months ago #

    It is definitely odd that you're having trouble with this, and I know how frustrating it must be.

    I see that you're running WordPress 3.9.1 and I do seem to see widgets on all your pages - including the homepage - have you managed to get this sorted out, perhaps by upgrading your WordPress install?

  23. tomjkt
    Member
    Posted 10 months ago #

    Yes I upgraded to the latest WP version. I reinstalled the theme and now it runs again fine! (I did this actually already once).
    So the mystery is not solved, but at least the problem vanished.
    Thanks for your support, Kathryn!

  24. Kathryn
    Automattic Happiness Engineer
    Posted 10 months ago #

    Glad that did the trick! It's possible that when you previously installed the theme, one of the theme files didn't get fully copied over, or was corrupted during the transfer.

    Marking this as resolved!

Reply

You must log in to post.

About this Theme

About this Topic