Joomla Warning: Parameter 2 to frontpage()

There must be thousands of webdevs that have at one point installed Joomla 1.0.x on successful sites, where their hosts have upgraded PHP and SQL versions recently (and without notice!)

One of these is one.com, though it would be improbable that they are the only hosts that frequently upgrade their server software surrupticiously.

This is fine, except that if a large number of devs use CMSes where the point is to not dev all the php yourself, a large number of websites can be made completely inoperable if there is a flaw in the php scripts of the CMS, or if server software upgrades are not backwards compatible.

In the case of Joomla 1.0.x, every single page on my company’s site failed to fetch articles from the Database. That’s right, zero content. :)

This was the error message from Joomla:

Warning: Parameter 2 to frontpage() expected to be a reference, value given in C:\xampp\htdocs\mambo\includes\Cache\Lite\Function.php on line 100

And this was the solution posted on Joomla forums: (All credit goes to Kjell Hählen.)

I wrote a fix. My version is Joomla 1.0.13 but I suppose it will not be very different for later versions.

You sould replace two files by the ones in the attachment:

/includes/Cache/Lite/Function.php
(this solves the “Reference instead of value”-problem)
/includes/vcard.class.php
(to make the contact form work again)

If you rather add the changes by hand:
The changes to vcard.class.php are minor, look for:
Code:
if(!function_exists(‘quoted_printable_encode’))

In Function.php I added a this line twice:
Code:
$arguments = $this->fixCalls($arguments);

The new function (fixCalls) is added at the end of the file.

Get the mirrored fix file >> HERE <<

It turned out to be a simple fix, just changing a couple lines in two PHP scripts, in my case I used the fix zipfile. I’m blogging about it since files have a tendency to stop being hosted and forum posts get archived.

I can’t guarantee the fix will work for your site. But it saved a tricky upgrade path for me, and so I wanted to make sure the solution doesn’t get lost, folded, spindled or mutilated. :) (Kjell, if you don’t like this, let me know and I’ll take it down.)

Advertisements

About maximilion

I seek truths and try to make you see them. View all posts by maximilion

92 responses to “Joomla Warning: Parameter 2 to frontpage()

  • E M

    Hello

    Thanks so much for the help,

    It has helped a lot

    Regards

  • fred

    great fix. Its work fine on my web site.

  • aart

    Thank you very much! I found the fix on the joomla site, but was unable to download the zip file with the fix. Luckily you’ve foreseen this and provided the zip!

  • Yus

    Muy útil la solución a este problema. Me sirvió de mucho.

    Muchas Gracias

  • Fabián

    Thanks so much !!
    Resolví el problema rápidamente.
    Gracias Max.

    Fabián

  • Zucky

    Worked on my site as well!

    Thank you!!

  • Jose

    Effective and fast solution, my site works again.

    Thank a lot.

    Jose

  • RR

    Thanks for posting the zip files. Worked for the site!!

  • Paul

    Thank you for your thoughtfulness. I quickly found the old post without an attachment too and hoped it would be around somewhere — and here it is! :-)

  • Adrian

    Tego właśnie mi było potrzeba! Dzięki wielkie za info jak zlikwidować ten błąd. Dzięki!! It works!

  • Arash

    Thanks you!

    Working great!

  • Robert Smith

    Hi,
    another thankful User, saved me downgrading and a lotof work!

  • oskarit0

    thanks a lot it really works! :D _\,,/

  • Jac

    Excelente aporte.. Mil GRACIAS! He solucionado mi problema! =]

  • Muhammad

    A very simple solution to this problem (without any extra code):
    In Function.php file line 92
    replace this: $result = call_user_func_array(array($class, $method), $arguments);
    with $result = call_user_func_array(array($class, $method), &$arguments);
    In line 100 of the same file
    replace this: $result = call_user_func_array($target, $arguments);
    with : $result = call_user_func_array($target, &$arguments);

    the solution is very simple put ‘&’ before $arguments.

  • balem

    Grandioso.., muchas gracias

  • Nam Le

    My site is worked. Thanks so much!

  • Mark

    Dude, you rock!!!!!

    You saved me a ton of time troubleshooting this thing. Thanks a ton. If you’re every out in Phoenix, I’ll buy you a beer! :-)

  • TexAmicoMio

    Ottima soluzione!
    Grazie

  • thomasbesmerThomas

    Wow, thank you for this post. He has rescued me…

  • German Diaz

    Excelente solución, muchas gracias

  • mortay

    Me ha venido GENIAL … muchas gracias!!!

  • Mario Cadiz

    Fix applied, now the site is working fine again.
    Many thanks,

  • Dinesh Vaseeta

    Thanks a lot.
    Your solution is working !!!!

  • Tom

    what do you mean by “But it saved a tricky upgrade path for me” ? Are you saying that upgrading your php scripts is not worth your time because it may be “tricky” ? If that is the case, I am amazed your host hasn’t removed you yet. People like you are dangerous. You don’t just upgrade when something doesn’t work. Upgrades are a necessity with these easily exploited scripts and you should be well aware of this and encourage others to keep these vulnerable CMS scripts up to date.

    • maximilion

      Whoa, that’s some pretty hostile comments there. If you inform yourself of how an upgrade from 1.0.x to 1.5.x was done, you will see it’s not done by unzipping a zip file and uploading the file, let alone clicking a button that runs an upgrade script.

      Both 1.0.x and 1.5.x had vulnerabilities, most of which were fixed by upgrading. But they are two branches and switching branches required many steps. This fix simply translates a function to the new PHP version and doesn’t add a vulnerability.

  • Enrique

    Thank you for providing the link to that zip file. It is really helpfull.

    Tom: I understand what you mean, but you must understand the overhead of upgrading your joomla site from one version to another, most recent version. The good part of this fix is that with a simple code change you turn a whole broken site to a working site in a snap. The upgrade of the site to newer versions of the CMS needs testing, sometimes hours of work (perhaps you don’t have the time or the site is not worth the extra work) and in the meantime you can have the old site working again. So, this fix is a adequate solution, that’s it.

  • bojan

    Great fix thanks from Croatia

  • Joomla Warning: Parameter 2 to frontpage() pada Joomla 1.0 dan PHP 5.3 | Blog Tutorial Dapur Hosting

    […] frontpage() cukup upload file-file yang terdapat di file zip ini: fix_joomla_10x_php_530 (credit to maximilion). Berikut ini instruksi uploadnya:Download dan extract file : fix_joomla_10x_php_530Upload file […]

  • Dave

    Hi,
    thx for the fix patch, but i cant download it now.
    i would like to add it by hand but not too sure about your instruction

    you mention that
    ====================================
    If you rather add the changes by hand:
    The changes to vcard.class.php are minor, look for:
    Code:
    if(!function_exists(‘quoted_printable_encode’))
    =====================================

    do you mean look for this line in the exsisting vcard.clas.php ? after found it in the file then what ??? then change to something else ? if so what to change then?

    ====================================
    In Function.php I added a this line twice:
    Code:
    $arguments = $this->fixCalls($arguments);

    The new function (fixCalls) is added at the end of the file.
    =====================================

    when i add this it shows this

    Fatal error: Using $this when not in object context in /home/guitarad/public_html/includes/Cache/Lite/Function.php on line 114

    please advice then. thank you.

  • Dave

    i found the solution

    i think should change as below in Function.php

    1.
    from: $result = call_user_func_array(array($class, $method), $arguments);
    to:$result = call_user_func_array(array($class, $method), &$arguments);

    2.
    from: $result = call_user_func_array(array($$object_123456789, $method), $arguments);
    to: $result = call_user_func_array(array($$object_123456789, $method), &$arguments);

    3.
    from: $result = call_user_func_array($target, $arguments);
    to: $result = call_user_func_array($target, &$arguments);

  • Pocho

    It works. thanks very much

  • sheet metal fabrications

    This is very interesting, You are a very skilled blogger.

    I have joined your feed and look forward to seeking more of your
    great post. Also, I have shared your web site in my social networks!

  • personal development plan

    I all the time emailed this blog post page to all my contacts, since if like to read it after that my friends will too.

  • coffee green beans

    Hi, just wanted to tell you, I liked this post. It was practical.
    Keep on posting!

  • Www.Dereklitchfield.Com

    I know this if off topic but I’m looking into starting my own weblog and was wondering what all is needed to get set up? I’m assuming having a blog like
    yours would cost a pretty penny? I’m not very web smart so I’m not 100%
    sure. Any suggestions or advice would be greatly appreciated.
    Kudos

  • https://www.thecellbuckle.com/the-cell-buckle-iphone-car-holder

    What’s up, its fastidious piece of writing regarding media print, we all know media is a great source of facts.

  • Humberto

    They are the workout that a lot of exercisers do when they are on the way
    to working their ab muscles in the way they want them.
    The key is to focus on stomach and oblique muscles and then
    combine the exercise with some good cardio exercise
    routines. Hold for 5 seconds, then slowly move back to
    face forward position.

  • cicerone.org

    This post offers clear idea in favor of the new viewers of blogging, that really how to do blogging and
    site-building.

  • Geri

    Please let me know if you’re looking for a author for your blog. You have some really great posts and I think I would be a good asset. If you ever want to take some of the load off, I’d absolutely love to write some content
    for your blog in exchange for a link back to mine.
    Please send me an e-mail if interested. Many thanks!

  • Brittney

    Woah! I’m really loving the template/theme of this website. It’s simple, yet effective.
    A lot of times it’s tough to get that “perfect balance” between superb usability and visual appeal. I must say you have done a fantastic job with this. In addition, the blog loads super quick for me on Safari. Excellent Blog!

  • Christy

    Woah! I’m really digging the template/theme of this blog. It’s simple, yet effective.
    A lot of times it’s very hard to get that “perfect balance” between user friendliness and appearance. I must say that you’ve done a superb job with this.
    Additionally, the blog loads very fast for me on Safari.

    Exceptional Blog!

  • Windy

    I was suggested this blog by my cousin. I’m not sure whether this post is written by him as no one else know such detailed about my problem. You’re
    amazing! Thanks!

  • www.tastyjuicingrecipes.com

    Hi there i am kavin, its my first occasion to commenting anyplace,
    when i read this post i thought i could also make comment due to this
    brilliant article.

  • http://www.vegetablejuicingrecipesforweightloss.com

    It’s the best time to make a few plans for the future and it is time to be happy. I’ve
    read this publish and if I may I desire to suggest you few fascinating issues or tips.
    Maybe you can write next articles referring to this article.
    I want to read more issues approximately it!

  • Melvina

    Heya i’m for the first time here. I found this board and I find It truly helpful & it helped me out a lot. I’m hoping to give something back and aid others like you helped me.

  • Regan

    Wow that was odd. I just wrote an really long
    comment but after I clicked submit my comment
    didn’t show up. Grrrr… well I’m not writing all that over again.

    Regardless, just wanted to say great blog!

  • Methadone Treatment Centers

    Does your blog have a contact page? I’m having problems locating it but, I’d like
    to shoot you an e-mail. I’ve got some ideas for your blog you might be interested in hearing. Either way, great blog and I look forward to seeing it grow over time.

  • Doris

    Hello colleagues, nice paragraph and good urging commented here,
    I am truly enjoying by these.

  • Valencia

    Hello, i believe that i saw you visited my website thus
    i got here to go back the want?.I am attempting to to find things to
    improve my web site!I assume its adequate to make use of a
    few of your ideas!!

  • Ofelia

    I have read so many content about the blogger lovers however this article is in fact a pleasant piece of writing,
    keep it up.

  • Tracy

    It’s an amazing article in support of all the online people; they will obtain benefit from it I am sure.

  • contemporary kitchens designs

    Hey! I just wanted to ask if you ever have any trouble with hackers?
    My last blog (wordpress) was hacked and I ended up losing months of hard work due to no
    backup. Do you have any solutions to protect against hackers?

  • business plan outline

    Nice post. I learn something new and challenging on sites
    I stumbleupon on a daily basis. It will always be exciting to read content from other authors and practice something from
    other web sites.

  • seo content

    They essentially plot the amount of electricity, making it the first Seo
    Content Management cell with an external quantum efficiency over 100 percent.
    Researchers from the University of Alaska Fairbanks
    has issued a forecast for extreme auroral activity this weekend,
    particularly across northern latitudes of the United States.
    When left on the outside that attract the sunrays to it. The sun erupted on Tuesday
    evening, and the process factor was addressed. 9% and
    4 73% after finding Chinese seo content management manufacturers
    received unfair government assistance.

  • best beat making software

    I’m extremely impressed with your writing skills and also with the layout on your weblog. Is this a paid theme or did you customize it yourself? Anyway keep up the excellent quality writing, it’s rare to see a nice blog like this one today.

  • plant garcinia

    all the time i used to read smaller content that also clear their motive, and that is also happening with this post which
    I am reading now.

  • odliczenie internetu od podatku

    I know this website provides quality dependent posts and other stuff, is there any other web page which provides these kinds of things in quality?

  • solar lighting

    By simply you doing your behalf your friends will see and they could become curious thus spreading the great consequences
    on our world. By inserting a flexible solar panel in to the leather cover,
    it nicely displays the combination of decoration and the availability of the item.
    This photovoltaic effect would be developed and improved upon to lead to the photovoltaic solar panels in use today.

  • renovated bathrooms before and after

    They are used quite often on smoke damaged walls and will cover and adhere to
    almost anything. However these loan plans charge a higher rate of interest compared to the secured loan plans.
    If you are renovating a house then you will enjoy reading this article because here you
    will find a host of tips on how to ensure you see the greatest returns.

  • bathroom restoration

    When you already have a budget, you will be financially guided with the renovation.

    However these loan plans charge a higher rate of interest
    compared to the secured loan plans. The old adage, “measure twice and cut once” certainly applies
    here too.

  • darmowy program pit 2013

    Very nice post. I simply stumbled upon your
    weblog and wished to mention that I have really enjoyed browsing your blog posts.
    After all I’ll be subscribing to your feed and I hope you write again soon!

  • datingblogsite.com

    Nate Thompson returned to campus to speak to other property owners who wants to rent.
    Read this article to find out, all of the important things that the aspen property management corporation assumes is being the
    connection among the proprietor and occupant. This type of sales
    representative generally does not leave the office as well as up-to-date understanding of home legislation and definately will help you in getting the
    exact view of the home. It is like talking a jumper off the
    ledge!

  • ulgi za 2013

    I like the valuable information you provide in your
    articles. I will bookmark your weblog and check again here frequently.
    I am quite sure I’ll learn many new stuff right here! Good luck for the next!

  • in home alarm systems

    Install the camera at a proper distance from the area to
    be surveyed. The consolidation process among China’s radio and TV networks announced on 24 August 2010 envisages financing of more than 10 billion dollars, with investments coming from the government as well as broadcasters and TV companies. Some people may question the invasion of privacy through the use of CCTV but it may be a good idea to ask the same people as to whether they.

  • remodeled bathroom

    It’s all about the bottom line if your full-time job will be, it is the responsibility of the property management zebulon nc job. The task of property management zebulon nc can prove to be an asset for you in your decision-making. If you think you can still celebrate the Independence Day whether the traditional ways or the extremely creative ways! There are not enough homeowners for a turnover to homeowner control at this time, they both embark as thunder buddies for life. Whether you own a few rental commercial or residential property.

  • truck laptop stand

    Whether your field of know-how is engineering or design, laptops can assist you
    with your daily work. An established brand name, a history of quality,
    and reliable tech support team are important
    considerations when deciding on a laptop, though
    the prices available from a number of different companies ought to always be investigated.
    If you might be looking for repair parts, it is possible to find laptop
    CPU cooling fans, DVD drives, parts for various varieties of
    radios, card readers, laptop skins and random access memory parts.

  • information technology news

    Face the family “competitive”, “and female Cheng – Feng” high
    expectations – Drum dryer,Artificial sand maker and other machines are the sand making equipment,
    , facing the school high test scores pressure of study, the network has become middle school students from burden and
    pressure “bomb shelter,” one of the academic and psychological
    pressure release burden the spirit of paradise. Monoclonal antibody
    technology uses the cells from the immune system to make antibodies.
    3D production ranges from the minor settings on a 3D camera
    to the more advance things you can do on your computer to
    the multi-million dollar production systems intoday’s big studios.

  • promo-kit.com

    You can help your members feel that sense of belonging and purpose everywhere they go by creating custom
    keepsakes they. Unless you have white hair or a resemblance to Senator Mc
    – Cain then consider a John Mc – Cain (vinyl or paper)
    mask. Moreover, members of sororities and fraternities on
    college campuses throughout the U.

  • what does green coffee bean extract do

    I don’t drop many responses, but i did a few searching and wound up here Joomla Warning: Parameter 2 to frontpage() | Perpetuum Immobile. And I actually do have some questions for you if you do not mind. Could it be simply me or does it look like a few of these comments come across as if they are left by brain dead visitors? :-P And, if you are posting at other places, I would like to follow anything fresh you have to post. Could you list of every one of all your social pages like your linkedin profile, Facebook page or twitter feed?

  • custom lapel pins cheap

    This is a great way to increase sales and ultimately increase your profits.
    Lapel years have served many functions, being useful for varied reasons.
    Propper Adventure Tech Advanced Protective Combat Uniform Bottoms.

  • program do rozliczania pit 2014

    Hi there, You have done an incredible job. I will certainly digg it and personally suggest to my friends.
    I’m confident they will be benefited from this site.

  • Sacramento bankruptcy attorney

    I’ll right away grab your rss as I can not to find your e-mail subscription link or newsletter service. Do you have any? Please allow me realize in order that I may just subscribe. Thanks.

  • wordpress.com

    Again, there exists no difficulty in doing this given it’s what one does best. While a good list builder and autoresponder will amount to some money upfront, it can be well worth it as your subscribers, readers and purchases climb higher. Individuals do understand how the its idols won’t clothe themselves in imitations plus obtaining the best models might fee a
    large amount.

  • buy lapel pins

    Few, if any suppliers of custom lapel pins supply these styles today.
    Custom challenge coins helps in distinguishing a team or a group.

    Motivation and encouragement is the key to get the maximum possible potential out of limited resources.

  • See how to lose weight fast

    Hey! Do you know if they make any plugins to
    protect against hackers? I’m kinda paranoid about losing everything I’ve
    worked hard on. Any recommendations?

  • martin

    This just saved me many hours. Really appreciate it guys

  • tooth whitening dentistry

    Actually no matter if someone doesn’t know then its up to other people that they will help, so here it occurs.

  • Make Money From Home

    I like it when individuals come together and share opinions.
    Great website, continue the good work!

  • Cheap Beats By Dre

    Hi, I do believe this is a great blog. I stumbledupon it ;) I’m going to revisit yet again since
    I book marked it. Money and freedom is the best way to change,
    may you be rich and continue to help other people.

  • mild insomnia symptoms

    Hello too every one, it’s actually a fastidious foor me to pay a
    visit this web site, iit includes preciouss Information.

  • Hud Homes

    It’s very easy to find out any topic on web as compared to books, as
    I found this piece of writing at this web page.

  • accident claim lawyers london

    If you want to take a great deal from this paragraph then you have to apply these strategies to
    your won weblog.

  • exporting car

    I’m really enjoying the design and layout of your blog.
    It’s a very easy on the eyes which makes it much more enjoyable for me to come here and visit more often. Did
    you hire out a developer to create your theme?
    Exceptional work!

  • mont blanc pen starwalker

    Iam really impressed with your writing skijlls and also
    with thee layout on your blog. Is this a paid theme or did you modivy it yourself?
    Either wayy keep up the excellent qualiyy writing, it is rare to see a great blog like
    this one today.

  • sex nung lon

    Good day! Would you mind if I share your blog with my facebook group?
    There’s a lot of folks that I think would really
    enjoy your content. Please let me know. Many thanks

  • sex nung lon

    I’m impressed, I must say. Rarely do I come across a
    blog that’s both educative and interesting, and
    let me tell you, you have hit the nail on the
    head. The problem is something which too few folks are speaking intelligently about.
    Now i’m very happy I came across this in my search for something
    regarding this.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: