Search
Other Sourcerer questions
Forum

Error - Call to undefined function

Neal Alvey's Avatar Neal Alvey
Hi all,

I am working on upgrading an out-of-date website - Joomla itself wasn't too far out of date, however many of the components/modules and the PHP version all need to be updated. As of now, the site is running on Joomla 3.10.4, PHP version is v7.3, and I'm now using Sourcer v9.0.3 Pro.

I am receiving the following message on some pages within the site: "0 - Call to undefined function mysql_query()." I know the issue here is that mysql_query needs to be changed to mysqli_query, however I receive this message on a page where Sourcer isn't being used (or I don't know where/why). The page is a menu item of Article >> Category List within Joomla.

The below image shows the messages I receive when I turn debugging on. Any thoughts on what's going on here? I'm working through a few other issues before I upgrade to PHP 7.4 or greater (once I upgrade I can't go back to 7.3).

EDIT - one final note, I had a couple of articles that still had old mysql_ references instead of mysqli_ and I received the same message. When I correct these, I receive a blank screen - no site, no text, or any debugging. Pages that do not use Sourcer show up as expected.

Thanks!
Neal



Confidential information:
(hidden)
Peter van Westen's Avatar Peter van Westen ADMIN
This is down to your own code you are running through Sourcerer. It is not code from Sourcerer itself.
Please post a rating at the Joomla! Extensions Directory
Neal Alvey's Avatar Neal Alvey
Thanks - that's what I'm starting to see. I found another page on the site doing something very similar and was able to update the PHP and have sourcer successfully work. I guess I just wasn't understanding why it was flagging the particular Category menu item. I'm struggling to find where the issues are - "static" PHP, snippets using Snippet, code within Sourcer, PHP issues, Joomla upgrade issues, etc. The site was first created in 2005 with Mambo and then poorly upgraded throughout the years.

This is unrelated and probably not appopriate in this forum, so you can ignore, but I upgraded my Snippets to the latest version as well. My parameters are no longer working as they were on the old version (don't recall the version but it was 2-3 years old). My syntax is:
{snippets <snippet alias>|<Parameter 1>|<Parameter 2}

Within the component I use \1 and \2 for the parameters but \1 and \2 are displayed instead. I don't see this syntax in the current documentation, however I did see your reply to some comments in the forum that the old syntax should work. Would upgrading it to Pro help?

Thanks again for your help and great products!
Neal Alvey's Avatar Neal Alvey
Perfect - thank you Peter. Happy New Year!
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription