Open GoogleCodeExporter opened 9 years ago
Probably this is a duplicate of Issue #421: adding from link is not supported
because there is no foreign key that the CCTM can read because the item is not
in the database. Ideally I'd remove that option from the upload dialog, but
WordPress has made it nearly impossible to reuse any of their code.
The only solutions here I can think of are as follows:
1. Add an FAQ explaining why this does not work (i.e. you can only have a
foreign key relation it the items actually exist)
2. OR Attempt to remove that tab from the lightbox (difficult given WP's
complete lack of sensible architecture)
3. OR attempt to detect when a link is added, then dynamically create a media
item on the fly. This is tricky because we would have no meta data about that
image and there's the possibility of that the URL already exists in the
database. There's also the possibility of a security threat if the "image"
that is linked to is actually a dynamic file that generates code.
Original comment by ever...@fireproofsocks.com
on 31 Jul 2013 at 3:52
Any update son this issue?
Original comment by daria.ab...@gmail.com
on 23 Oct 2013 at 2:39
The only reliable way to "fix" this is to rewrite the WordPress core
functionality, and building an asset uploader/management tool is a massive
undertaking. Barring that, I'd fall back to item #1 above.
Original comment by ever...@fireproofsocks.com
on 23 Oct 2013 at 3:03
Sorry just noticed my issue is not the same one posted above - I am basically
uploading a new image when i click insert into post I get "the cctm plugin was
unable to determine the id of the related item. avoid using alternate sizes of
images"
Then is I just click on choose image it lets me select the image but not the
size I want in fact it takes it's original full size which I don't want.
Original comment by daria.ab...@gmail.com
on 23 Oct 2013 at 3:15
It's possible that WP has once again changed its HTML for images. Will review.
Original comment by ever...@fireproofsocks.com
on 23 Oct 2013 at 3:23
*SYSTEM INFO*
------------------------
Plugin Version: 0.9.7.11-pl
WordPress Version: 3.6.1
PHP Version: 5.4.7
MySQL Version: 5.5.25
Server OS: WINNT
Language:
------------------------
ACTIVE PLUGINS:
------------------------
CURRENT THEME: Twenty Thirteen v.1.0 http://wordpress.org/themes/twentythirteen
Just in case this helps
Original comment by daria.ab...@gmail.com
on 23 Oct 2013 at 3:28
Do let me know if you have any updates for me,
Thanks.
Original comment by daria.ab...@gmail.com
on 25 Oct 2013 at 9:13
I'm trying to fix this, I don't think WP changes the HTML for images. I'm
trying to understand how your plugin works internally, I would appreciate if
you let me know when you have an update for this.
Original comment by daria.ab...@gmail.com
on 31 Oct 2013 at 5:05
For updates, subscribe to the issue -- I'll work on it as I'm able. Re the
functionality here: it's rocky because the WP architecture here is cludgy, and
the plugin is attempting a workaround. Instead of passing a raw ID, WP passes
an HTML block (i.e. it does this whole thing in a way that was clearly never
conceived of being reused in any other context other than for the narrow-minded
one for which it was conceived). That makes this whole thing very difficult:
there's a regular expression in one of the javascript files that attempts to
tease the post ID out of the HTML that WordPress sends.
See the custom-content-type-manager/js/relation.js file: there are comments in
there at the top. The function in question is cctm_upload().
Original comment by ever...@fireproofsocks.com
on 31 Oct 2013 at 5:19
Original issue reported on code.google.com by
parama.d...@gmail.com
on 31 Jul 2013 at 12:31