WordPress.org

Forums

Types
Embedded types miscalculating base URL (1 post)

  1. ccarey75
    Member
    Posted 1 year ago #

    Environment: IIS7, Windows 2008 Server, MySQL
    Using latest version of Types

    I'm using the option to embed the types plugin code into my theme.
    On the post edit screen I was getting a JavaScript error about missing validation library and when inspecting the HTML code, it appear that Types is miscalculating the URL to its resources.

    For example, this is the resource path:

    http://www.mysite.comD:/vhosts/mysite.com/httpdocs/wp-content/themes/mytheme/embedded_types/resources

    This works fine when using the plugin (i.e. not embedding).

    I did a little digging and the issue seems to be confined to "path.php" in classes:

    embedded_types/classes/path.php

    • getDocRoot() : this method generates the doc root, but is actually coming back with the path to post.php
      d://vhosts//mysite.com//httpdocs//wp-admin//post.php
    • It also has doubled forward-slashes.
    • getFileUrl() the resultant $docroot is not a substring of $__FILE__ so it just concatenates them.

    http://wordpress.org/plugins/types/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Types
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic