Topic-icon Display error with upgrade to joomla 3.4

Active Subscriptions:

None
9 years 1 month ago #51473 by dottorx
Hi,

I just upgraded my joomla version from 3.3.x to 3.4 but I received this error:
Strict Standards: Declaration of JFBConnectProfileDataProxy::bindData() should be compatible with Joomla\Registry\Registry::bindData($parent, $data, $recursive = true, $allowNull = true) in /data/vhosts/i-mago.org/FEL-ultimate/components/com_jfbconnect/libraries/profile.php on line 119

Surfing in internet i only found tip for upgrade my JFB version but i have the 6.2.4 version.

Thank you for your help
File Attachment:
The topic has been locked.
Support Specialist
9 years 1 month ago #51478 by mel
Here's a quick code fix, which has already been checked in for the next 6.3 release. In components/com_jfbconnect/libraries/profile.php, around line 115, add
if (version_compare($jVersion->getShortVersion(), '3.4.0', '>='))
{
    class JFBConnectProfileDataProxy extends JRegistry
    {
        /* bindData
         * Overridden function due to Joomla's checking of each variable to see if it's an associative array or not
         * We don't care, we want all arrays to be translated to a class
         */
        protected function bindData($parent, $data, $recursive = true, $allowNull = true)
        {
            // Ensure the input data is an array.
            if (is_object($data))
                $data = get_object_vars($data);
            else
                $data = (array)$data;

            foreach ($data as $k => $v)
            {
                if (is_array($v) || is_object($v))
                {
                    $parent->$k = new stdClass;
                    $this->bindData($parent->$k, $v);
                }
                else
                    $parent->$k = $v;
            }
        }
    }
}

Then change the if statement right after that from
if (version_compare($jVersion->getShortVersion(), '3.3.0beta', '>='))
to
else if (version_compare($jVersion->getShortVersion(), '3.3.0beta', '>='))

If you find any more issues in Joomla 3.4, please let us know.

-Melissa
The topic has been locked.
Active Subscriptions:

None
9 years 1 month ago #51563 by erika
Hi!
I have the same problem. I made the changes in the code profile.php, but that doesn´t work. When I do the changes the hole jbf_connect crashes in my joomla 3.4.

And I even recognized that when I did the changes (the quick fix) in dreamveawer a got syntax error....(on line 151)

Im worthless at php so please can you look at the code below and help me out with this problem. I really need this to work this weekend.

Best regards,
Erika

[Edited to remove code]
The topic has been locked.
Support Specialist
9 years 1 month ago #51564 by mel
This line needs to be able the new if statement, otherwise it is not defined and will cause the crash
$jVersion = new JVersion();

so that it will look like this
$jVersion = new JVersion();
if (version_compare($jVersion->getShortVersion(), '3.4.0', '>='))
{
...
}
else if (version_compare($jVersion->getShortVersion(), '3.3.0beta', '>='))
...
The topic has been locked.
Active Subscriptions:

None
9 years 1 month ago #51565 by erika
Thanks for helping me!
Everyting is working great now:)
The topic has been locked.
Support Specialist
9 years 1 month ago #51567 by mel
Glad it's all working now; let us know if you run into any other issues with 3.4
The topic has been locked.
Active Subscriptions:

None
Hi Melissa

Now I need help too
upgraded my joomla version from 2.5.8.x to 3.4

My code:

// Declare a special JRegistry class with bindData specific to the J! version to prevent a strict standards
$jVersion = new JVersion();
if (version_compare($jVersion->getShortVersion(), '3.3.0beta', '>='))
{
class JFBConnectProfileDataProxy extends JRegistry
{
/* bindData
* Overridden function due to Joomla's checking of each variable to see if it's an associative array or not
* We don't care, we want all arrays to be translated to a class
*/
protected function bindData($parent, $data, $recursive = true)
{
// Ensure the input data is an array.
if (is_object($data))
$data = get_object_vars($data);
else
$data = (array)$data;

foreach ($data as $k => $v)
{
if (is_array($v) || is_object($v))
{
$parent->$k = new stdClass;
$this->bindData($parent->$k, $v);
}
else
$parent->$k = $v;
}
}
}
}
else if (version_compare($jVersion->getShortVersion(), '3.0.0', '>='))

error message:
Strict Standards: Declaration of JFBConnectProfileDataProxy::bindData() should be compatible with Joomla\Registry\Registry::bindData($parent, $data, $recursive = true, $allowNull = true) in /customers/3/7/d/budopedia.org/httpd.www/joomla3/components/com_jfbconnect/libraries/profile.php on line 119 Strict Standards: Only variables should be assigned by reference in /customers/3/7/d/budopedia.org/httpd.www/joomla3/plugins/system/jumirouter/jumirouter.php on line 20 Strict Standards: Only variables should be assigned by reference in /customers/3/7/d/budopedia.org/httpd.www/joomla3/plugins/system/websitePreloader/websitePreloader.php on line 14 Strict Standards: Only variables should be assigned by reference in /customers/3/7/d/budopedia.org/httpd.www/joomla3/plugins/system/websitePreloader/websitePreloader.php on line 15 Fatal error: Class 'JParameter' not found in /customers/3/7/d/budopedia.org/httpd.www/joomla3/plugins/system/cachecontrol/cachecontrol.php on line 47
The topic has been locked.
Support Specialist
9 years 1 month ago #52082 by mel

Strict Standards: Declaration of JFBConnectProfileDataProxy::bindData() should be compatible with Joomla\Registry\Registry::bindData($parent, $data, $recursive = true, $allowNull = true) in /customers/3/7/d/budopedia.org/httpd.www/joomla3/components/com_jfbconnect/libraries/profile.php on line 119

This error is fixed in the latest version of JFBConnect v6.3, but you can follow the workaround found in my above post from Feb-25-15 14:20:32. It details exactly what you should do to fix the error.

Strict Standards: Only variables should be assigned by reference in /customers/3/7/d/budopedia.org/httpd.www/joomla3/plugins/system/jumirouter/jumirouter.php on line 20 Strict Standards: Only variables should be assigned by reference in /customers/3/7/d/budopedia.org/httpd.www/joomla3/plugins/system/websitePreloader/websitePreloader.php on line 14 Strict Standards: Only variables should be assigned by reference in /customers/3/7/d/budopedia.org/httpd.www/joomla3/plugins/system/websitePreloader/websitePreloader.php on line 15 Fatal error: Class 'JParameter' not found in /customers/3/7/d/budopedia.org/httpd.www/joomla3/plugins/system/cachecontrol/cachecontrol.php on line 47

These errors are not from JFBConnect.
The topic has been locked.