This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 1 reply, has 2 voices.

Last updated by Bobby 3 months ago.

Assigned support staff: Bobby.

Author Posts
July 18, 2019 at 1:34 pm #4239145

jeffreyS-12

I am trying to:
Use newest version of WPML String Translation (v 2.10.5.1)

Link to a page where the issue can be seen:
Under dev

I expected to see:
No warnings

Instead, I got:
Multiple warnings:

Warning: Use of undefined constant FS_CHMOD_DIR - assumed 'FS_CHMOD_DIR' (this will throw an Error in a future version of PHP) in /wp-admin/includes/class-wp-filesystem-direct.php on line 504

Warnings visible after WPML String Translation activations and with config:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', true );
define( 'WP_DEBUG_LOG', true );
define( 'SCRIPT_DEBUG', true );

Defining FS_CHMOD_DIR and FS_CHMOD_FILE is not an option here.

July 18, 2019 at 5:52 pm #4241639

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

The notice is not quite pointing to WPML or WPML String Translation.

As far as i am aware of we are not using FS_CHMOD_DIR or FS_CHMOD_FILE in our plugins

There is a possibility your theme author is using a constant that you can put in wp-config.php, but because you don't use that constant, and the author never checks if it's actually defined, the code throws a PHP warning

(ex. defining FS_CHMOD_DIR in your wp-config.php resolves the warning)

https://codex.wordpress.org/Editing_wp-config.php#Override_of_default_file_permissions

The FS_CHMOD_DIR and FS_CHMOD_FILE define statements allow override of default file permissions.

does the issue persist with WPML activated on a minimal environment ?

The topic ‘[Closed] Use of undefined constant FS_CHMOD_DIR’ is closed to new replies.