• Resolved Ripsnorta

    (@ripsnorta)


    Good job on the 2.1 update. It broke the entire wordpress site, on first use after the update. I couldn’t even uninstall the theme from admin since that was broken too.

    Fortunately I was able to track down the problem to 2 lines of code in wp-content/themes/narga/core/library/layouts/custom-header.php at lines 56 and 60.

    Both !empty(get_header_image()) calls in the if statement needed to be replaced by first putting the return value of get_header_image into a variable and using that variable instead. The empty function requires a variable.

    So. Good job testing that guys. It kinda looks like you didn’t.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Jeeeees…..
    I used the Narga theme before on one site, it worked OK apart from the site not being able to open a menu when on a smart phone/tablet.
    As I was told it was fixed, I just installed on a clients site and got the same problem as you describe above!

    (Fatal error: Can’t use function return value in write context in /storage/content/12/146012/hyssna.se/public_html/wp-content/themes/narga/core/library/layouts/custom-header.php on line 56 )

    (Site address is https://hyssna.se/)

    P*A*N*I*C!!! Did you use a ftp to update and make it work again?

    My problem is that I don’t have access to their ftp right now, but hopefully I can find it.

    How do I fix it? Can I just go into the site/wp-content/themes and delete the narga-folder altogether? Or do I break the site even more then???
    Extremely grateful if you can tell me how you fixed it, or if above suggestion would work…

    Thank you in advance!

    Thread Starter Ripsnorta

    (@ripsnorta)

    I did FTP via my hosts control panel and edited the file in place.

    As I mentioned, above the file you want is: wp-content/themes/narga/core/library/layouts/custom-header.php

    And track down lines 56 and 60

    Before line 56 enter the code

    $himage = get_header_image();

    and then in both lines 56 and 60 replace get_header_image() with $himage

    That should fix the problem. I also suggest downloading an add-in to disable theme updates. You don’t want a future ‘untested’ update to break your site again.

    You should also, through your hosts control panel, backup your install before doing this (or if you choose to delete the theme.)

    Deleting the theme via FTP shouldn’t break your site as far as I know, WordPress should revert to a basic theme (or at least tell you to choose a new one.) If you feel daunted by editing the code, this may be a better choice for you.

    Thank you thank you thank you!!!
    I will definately try to fix it first by using the codes you provided, hopefully that will make it work.
    After that, believe me, I will do a proper backup and then delete the narga-file from both pages I have tried it on. I’m done with it.
    Shame though, I think it’s nice; the menu on top and the background color over the whole page…
    Ohwell, rather a working “dull” site, than a broken “cool” one… ??

    Thanks again!

    Just for information, using the codes above fixed it, and I also tried deleting the theme (via ftp) and that made me able to login again and choose another theme.

    So two possible solutions. Thanks Ripsnorta!

    Best of luck!

    Theme Author narga

    (@narga)

    Sorry about your problem. It’s fixed in version 2.2 that has been summited to Theme Review Team.
    I’m not receive email from Support forum (HERE) so I can’t help you asap.
    If you want to use it before it’s approved, you can clone it from
    https://github.com/Narga/narga-basic/

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘2.1 Update Broken’ is closed to new replies.