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 thread is resolved. Here is a description of the problem and solution.

Problem:

Warning: scandir(): S3_Uploads_Stream_Wrapper::dir_readdir is not implemented! in /var/www/html/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-templates.php on line 175

Fatal error: Uncaught exception 'Aws\S3\Exception\S3Exception' with message 'Error executing "ListObjects" on "https://s3-eu-west-1.amazonaws.com/

Does it help if I tell you that this function is responsible for custom wpml language switcher templates. It scans directories $dirs_to_scan defined in the function above that – init_available_templates().

You will also find this above:

		/**
			 * Filter the directories to scan
			 *
			 * @param array $dirs_to_scan
			 */
			$dirs_to_scan = apply_filters( 'wpml_ls_directories_to_scan', $dirs_to_scan );

Second tier also suggested that you try commenting that code, since the filter I suggested above does not actually remove any of that ( because it is being called before these directories are being initialized), so you can use it to add your own directories while commenting and hence disabling the original WPML code, maybe it will work.

Tagged: 

This topic contains 9 replies, has 2 voices.

Last updated by anaA-13 2 weeks, 1 day ago.

Assigned support staff: Bruno Kos.

Author Posts
September 25, 2019 at 9:50 am #4637467

anaA-13

I am trying to:
get plugins to work

Link to a page where the issue can be seen:
local staging server internal link only

I expected to see:
plugin working

Instead, I got:

Warning: scandir(): S3_Uploads_Stream_Wrapper::dir_readdir is not implemented! in /var/www/html/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-templates.php on line 175

Fatal error: Uncaught exception 'Aws\S3\Exception\S3Exception' with message 'Error executing "ListObjects" on "hidden link

September 25, 2019 at 11:16 am #4638135

anaA-13

please contact via ben.oats@digitalshadows.com

September 25, 2019 at 11:46 am #4638383

anaA-13

So have spoken with Dev opps and we may how to allow access but we need more information about this function and why you need access

September 25, 2019 at 11:49 am #4638395

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Ok, I asked our 2nd tier about all of this and am waiting for a reply.

Regards,
Bruno Kos

September 25, 2019 at 11:58 am #4638453

anaA-13

actually if we can understand the need for upload access we may how to resolve this, can you explain the need for access to the upload folder ?

September 26, 2019 at 8:17 am #4644343

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Does it help if I tell you that this function is responsible for custom wpml language switcher templates. It scans directories $dirs_to_scan defined in the function above that – init_available_templates().

You will also find this above:

		/**
			 * Filter the directories to scan
			 *
			 * @param array $dirs_to_scan
			 */
			$dirs_to_scan = apply_filters( 'wpml_ls_directories_to_scan', $dirs_to_scan );

Regards,
Bruno Kos

September 26, 2019 at 8:18 am #4644435

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Also see this:
https://wpml.org/wpml-hook/wpml_ls_directories_to_scan/

Regards,
Bruno Kos

October 1, 2019 at 2:35 pm #4672957

anaA-13

hello Bruno how do i access the second level

October 2, 2019 at 7:54 am #4677605

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Let me know what you want me to ask them. They also suggested that you try commenting that code, since the filter I suggested above does not actually remove any of that ( because it is being called before these directories are being initialized), so you can use it to add your own directories while commenting and hence disabling the original WPML code, maybe it will work.

Regards,
Bruno Kos

October 2, 2019 at 2:55 pm #4681715

anaA-13

My issue is resolved now. Thank you!