Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • I was having the same issue. I noticed that ilpet got an answer to this on stackoverflow. So to close off this topic for the benefit of those that find it in the future, here is a link:

    http://stackoverflow.com/questions/7610702/wordpress-remove-submenu-from-custom-post-type

    The accepted answer probably does work, but I’d recommend using the solution below that, which to summarise suggests that you HTML encode the &, i.e. use &amp

    It worked for me.

    Thread Starter lcewp2012

    (@lcewp2012)

    What is the expected behaviour? For example, if the media file is a PDF, what would you expect to see in that modal?

    The thumbnail I mean is the one on the left hand side of the currently selected file for a Media custom field. The currently selected file is shown immediately below the Choose/Upload buttons. For a PDF it shows a static thumbnail called wp-includes/images/crystal/document.png and then beside that the name of the file and below the filename I see the date time that it was uploaded. There is a X image on the right of all of this that deletes the attachment.

    What I did is click on the thumbnail image.

    Thread Starter lcewp2012

    (@lcewp2012)

    Thanks for the quick response. Sounds like I could wait for the next patch release. A few days isn’t long to wait.

    I discovered another potential issue: After the media file is attached, clicking on the thumbnail pops up a modal that has a dump of the binary contents of the file. For example, if it is a PDF file then I see the binary contents of the file rather than the PDF (I’m not expecting the browser to actually render the PDF but I thought that it should do something other than displaying the binary content). Same happens for RTF and I would assume for any binary file other than images.

    Is there any way to avoid this other than hiding the thumbnail?

    Thread Starter lcewp2012

    (@lcewp2012)

    I have now confirmed that this guid issue is related to my configuration. What I did is drop all the tables in my database and rerun the install. After doing this, and then reactivating the Custom Content Type Manager plugin, the guid issue has gone away.

    So I think this means that something within my database was causing the issue, probably something in wp_options I’m guessing. I didn’t touch the WordPress application code at all, i.e. the php code was identical either side of the data ‘clearance’, so this seems to suggest it was data related and nothing to do with your plugin. I suspect another plugin has left something such as perhaps a shared option in an inconsistent state.

    So back to the original operator issue. As noted, I can work around this by doing the following:

    $hash['direct_filter'] .= $this->_sql_filter($wpdb->posts, $c, '=', $this->$c);
    //$hash['direct_filter'] .= $this->_sql_filter($wpdb->posts, $c, $this->operators[$c], $this->$c);

    i.e. comment out the one using the operators and uncomment the line using the hardcoded ‘=’. Does this seem like an acceptable workaround?

    My concern about moving to the development build is that it isn’t recommend for a production site. But then again, a hacked version of an official release doesn’t seem ideal either. What are your thoughts on the best way to go with this for a production site? The solution shown above or the development build?

    Thread Starter lcewp2012

    (@lcewp2012)

    I think this issue is something to do with my particular WordPress configuration at the present time. For some reason the images/media are saying that they have a link URL of this form:

    http://localhost:8444/wordpress/?attachment_id=118

    …but this doesn’t actually return anything (other than a WordPress “It seems we can’t find what you’re looking for” message). Instead the image is returned using a URL of this format:

    http://localhost:8444/wordpress/wp-content/uploads/wintersmall.jpg

    So I assume that the plugin is correctly obtaining the link URL from WordPress and is probably making a usually safe assumption that this link URL will match the guid. But for some reason in my WordPress setup the two do not match. I must have clicked some setting somewhere, or perhaps installed another plugin that has messed this up.

    Thread Starter lcewp2012

    (@lcewp2012)

    Out of interest, what is the purpose of this particular query? I assume it is meant to return something so that it can render the selected/uploaded media within the edit form. But as noted, when I changed it to use the hardcoded ‘=’ operator, the query doesn’t match anything (due to the guid being different than what it expected). So my assumption is that this is why after uploading and then inserting the media, there is no indication on the edit form that anything has been selected.

    I forgot to mention that last bit in my initial post. Nothing is displayed within the Media field in the Custom Field section of the edit form to show that a media file has been selected. I assume it should show something (e.g. filename, title, description) and I’m wondering if the guid used in the query not matching the guid of the new attachment row in wp_posts is why nothing is showing.

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