Title: Error message regarding Layout.php
Last modified: March 30, 2020

---

# Error message regarding Layout.php

 *  Resolved [eat123](https://wordpress.org/support/users/eat123/)
 * (@eat123)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/error-message-regarding-layout-php/)
 * So i get this error message, after upgrading to 2.33 from 2.31
 * `An error of type E_RECOVERABLE_ERROR was caused in line 682 of the file /hermes/
   bosnacweb02/bosnacweb02cc/b246/ipg.riissettlement/wp-content/plugins/photonic/
   layouts/Layout_Default.php. Error message: Argument 4 passed to Photonic_Layout::
   get_gallery_data_attributes() must be an instance of string, string given, called
   in /hermes/bosnacweb02/bosnacweb02cc/b246/ipg.riissettlement/wp-content/plugins/
   photonic/layouts/Layout_Default.php on line 337 and defined`
 * Due to this error. I am unable to edit the page where the photo gallery is.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Sayontan Sinha](https://wordpress.org/support/users/sayontan/)
 * (@sayontan)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/error-message-regarding-layout-php/#post-12604210)
 * Which PHP version are you on?
 *  Thread Starter [eat123](https://wordpress.org/support/users/eat123/)
 * (@eat123)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/error-message-regarding-layout-php/#post-12604211)
 * PHP 5.6
 *  Plugin Author [Sayontan Sinha](https://wordpress.org/support/users/sayontan/)
 * (@sayontan)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/error-message-regarding-layout-php/#post-12604225)
 * Hmm. Can you upgrade to 7.x?
 * If not, there is a fix you can try (while I patch the plugin):
    1. In your WP plugin editor (_Plugins → Plugin Editor_), select Photonic for editing,
       and go to the file layouts/Layout_Default.php.
    2. In [line 682](https://plugins.trac.wordpress.org/browser/photonic/trunk/layouts/Layout_Default.php#L682)
       you will see this:
        `private function get_gallery_data_attributes($short_code,
       $processor, array $pagination, string $columns) {`
    3. Change it to this:
        `private function get_gallery_data_attributes($short_code,
       $processor, $pagination, $columns) {`
 * Once you save the file, this should go away.
 *  Thread Starter [eat123](https://wordpress.org/support/users/eat123/)
 * (@eat123)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/error-message-regarding-layout-php/#post-12604243)
 * I can confirm that this change successfully works to display the gallery and 
   am able to edit the page again. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Error message regarding Layout.php’ is closed to new replies.

 * ![](https://ps.w.org/photonic/assets/icon.svg?rev=1972449)
 * [Photonic Gallery & Lightbox for Flickr, SmugMug & Others](https://wordpress.org/plugins/photonic/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/photonic/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/photonic/)
 * [Active Topics](https://wordpress.org/support/plugin/photonic/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/photonic/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/photonic/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [eat123](https://wordpress.org/support/users/eat123/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/error-message-regarding-layout-php/#post-12604243)
 * Status: resolved