• Resolved insearchofasolution

    (@insearchofasolution)


    Hi,

    I am using a directory theme that came with your plugin (Wyzi) and it is causing errors on my website:

    An error of type E_ERROR was caused in line 742 of the file /public_html/wp-content/plugins/option-tree/includes/ot-functions-admin.php. Error message: Cannot redeclare _sanitize_recursive() (previously declared in /public_html/wp-content/plugins/option-tree/includes/ot-functions-admin.php:742)

    Can you please advise.

    Thanks

    [ Please do not bump. ]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter insearchofasolution

    (@insearchofasolution)

    Thank you @paolobros !!

    This resolved the initial error but the dashboard notification now shows another one 🙁

    Notice: ot_validate_setting was called incorrectly. All stored data must be filtered through ot_validate_setting_input_safe, the typography option type is not using this filter. This is required since version 2.7.0.

    Any ideas?

    Plugin Author Derek Herman

    (@valendesigns)

    I’ll push out a hotfix version tomorrow.

    Thread Starter insearchofasolution

    (@insearchofasolution)

    @valendesigns Thank you. I have just updated my reply, as it’s giving me another error. It seems like it’s coming from OT. I’ll wait for the update tomorrow and then I’ll post an update.

    Plugin Author Derek Herman

    (@valendesigns)

    @insearchofasolution The ot_validate_setting_input_safe notice means you have a custom option type that is not using the new filter. It’s technically harmless, unless the data is not being saved after being ran through _sanitize_recursive. In order to ensure the data is being sanitized and validated correctly I had to create a way to notify users that the old way is wrong but still try and sanitize the data. In most cases things will be fine but the notice is there to let you know a custom option type needs to be updated to use the new ot_validate_setting_input_safe filter.

    Plugin Author Derek Herman

    (@valendesigns)

    However, the fact is says the typography option type gives me some concern because it’s sanitized above in the code. Maybe someone extended the option type in your theme?

    Thread Starter insearchofasolution

    (@insearchofasolution)

    @valendesigns No, it is not saving the option. The Wyzi theme has a settings panel where I can set up Google fonts to be used throughout the website. I suspect this has to do with some (semi-poor 🙂 ) custom work that’s been done on it, so I guess I’ll have to look into that as a priority.

    Thank you for the fix.

    Plugin Author Derek Herman

    (@valendesigns)

    One thing to note is that the old Google font API key in OptionTree doesn’t work anymore so you have to add your own key with the ot_google_fonts_api_key filter.

    Plugin Author Derek Herman

    (@valendesigns)

    The updated OptionTree version 2.7.1, which fixes the issue, will be available by the top of the hour.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘An error of type E_ERROR’ is closed to new replies.