Skip Navigation

[Closed] [bug] Types – does not support url ports, and php function name conflict

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 11 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

This topic contains 1 reply, has 2 voices.

Last updated by bruce 11 years, 11 months ago.

Author
Posts
#10268

embedded/includes/fields/image.php

versions up to 1.0 have the same issue, and in v1.0, line 695 rebuilds the url but does not take into account ports (often used with localhost and mamp, for instance). Correct line could be:
$info['dirname'] = $temp['scheme'] . '://' . $temp['host'] . (($temp['port'] != '') ? (':' . $temp['port']) : '') . dirname($path['path']);

This can cause a directory not writable error, and is most likely the reason for the (paid) support forum question: https://toolset.com/forums/topic/types-directory-not-writable-on-localhost/ (which I can't answer as I'm not a paid user).

Also, with v1.0, function is__writable($path) was added but it conflicts with at least one other plugin, http://wordpress.org/extend/plugins/dynamic-headers/

PHP Fatal error: Cannot redeclare is__writable() (previously declared in .../wp-content/plugins/dynamic-headers/custom-header.php:489) in .../wp-content/plugins/types/embedded/includes/fields/image.php on line 616

A quick search shows other plugins use same function name so it should be made more unique.

#10412

Hi Todd,

Thanks for this info. We'll fix the port issue.

We've already have a fix for the is__writable issue.

Best regards,
Bruce.

The topic ‘[Closed] [bug] Types – does not support url ports, and php function name conflict’ is closed to new replies.