Search

Help. After moving a site to a new server I am unable to access any sections. I receive a Symphony Warning:

Missing argument 1 for fieldMultilingual::__construct()

This code runs fine on the original server, guessing something might be messed up in the database following restore (SQL query is all about sql cache)

The full error message is:

Symphony Warning: Missing argument 1 for fieldMultilingual::__construct(), called in public_html/symphony/lib/toolkit/class.fieldmanager.php on line 534 and defined

An error occurred in publichtml/extensions/multilingualfield/fields/field.multilingual.php around line 18

versions of symphony + multilingual field would be helpful :) as well as that of php on your server.

What's your Symphony version on the old server? (Possibly 2.3.x)

What's your Symphony version on the new server? (Possibly 2.2.x)

Multilingual Field version is probably 2.x.

Sounds like the server has strict error reporting on. We define this in the bundle.php file.

Depending on the PHP version on your server, you may need to update your bundle.php file to represent the same as the one I linked to.

The error is referring to signature mismatch where the Multilingual Field is expecting a parameter to be passed to it from the FieldManager class when it is created. Since Symphony 2.3, the Field __construct method does not accept any parameters (it previously accepted $parent). Perhaps you need to update the Multilingual Field to the latest version (2.0 seems to be 2.3 compatible)?

This warning basically lets you know that a sub class has diverged from what the parent class expects. It's the basis for the majority of all warnings in PHP5.4 and has been something that we are cleaning up. However it is difficult because as much as we can clean the core up, we cannot clean up extensions :)

Thanks all

New server is running PHP 5.3.10 original server 5.3.6.

Symphony version is 2.3 on both

Extension is version 2.0 on both servers.

The bundle.php code looks the same as the linked code?

I have upgraded to the latest version of Symphony, and also updated the extension to 2.1 still get the same issue and am unable to access any Sections.

:( Out of ideas.

Does your server override your error_reporting settings?

Thanks for helping with this issue.

I have uploaded a basic php info test and set error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT);

Master value = 30711 Local value = 22519

What version of PHP are you running locally and what are you running on your new server?

New server is running 5.3.10

Development server is running 5.3.6

Hmm, something doesn't match up here. According to the PHP manual, the max value for E_ALL is 32767 in PHP 5.4.x, 30719 in PHP 5.3.x. The other error reporting level relevant to us are E_NOTICE = 8, E_DEPRECATED = 8192 and E_STRICT = 2048.

So now some maths:

PHP 5.4.x: 32767 - (8 + 8192 + 2048) = 22519 PHP 5.3.x: 30719 - (8 + 8192 + 2048) = 20471

So the master value (the 5.3.10 server) doesn't match either of these calculations. Interestingly your development server value matches the PHP 5.4.x value. I did some tests on my local environment (PHP 5.3.8) and my result was also 22519. It seems that the E_STRICT level is completely ignored in this statement. Very odd.

Regardless of that, your master value looks like it is actually E_ALL & ~E_NOTICE. Perhaps the file did not save on your new server?

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details