• Resolved regmanabq

    (@regmanabq)


    Just installed the plug in and have been testing around with it on a brand new WP 4 install. When uploading images via the insert media button on a post I would input the info on the right side, caption, description, alt text..ect… but it didn’t seem to be saving correctly.

    editing the image on the page showed the caption and alt text ok, but looking at it in the library and all data was blank.. caption, description, alt text.. all blank. I tried it with many different images, but every time I had MLA activated, nothing would save. When it was disabled everything saved fine.

    So, disabled all plug ins, switched to twenty fourteen theme, everything I could think of and the problem persisted.. activate MLA and the data would not save.

    I even went back and installed it fresh on my old WP 3.9.2 install.. same thing.. nothing saves. on the page you can see the caption and alt text, but in the library it is all blank when uploading while MLA is active. Deactivate it and all saves fine.

    Bug with the new update? or expected behaviour?? Thought I’d post to let you know and see if you had any ideas.

    the plug in looks great and would solve a few of the problems i’ll have with this new site.. just need it to save the info from the first upload screen.

    https://www.ads-software.com/plugins/media-library-assistant/

Viewing 15 replies - 1 through 15 (of 23 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thank you for reporting this issue and for taking the time to test it on both WP 4.0 and 3.9.2. You have found a defect introduced in my most recent upgrade to v1.93.

    I have reproduced and corrected the defect, and the fix will be part of my next version. I will leave this topic unresolved until the next version goes out.

    In the interim you can download the “Development Version”, which contains the fix. Go to the “Developers” tab above and click on the “Development Version” link to download it. If you would like a copy by e-mail, you can send me your contact information from the Contact Us page at our web site:

    Fair Trade Judaica/Contact Us

    I regret any inconvenience this caused you and the time required to find and test the new release. Please let me know if you try the interim version and if you have any other questions or problems regarding MLA. Thanks again for your help and for your interest in the plugin.

    Thread Starter regmanabq

    (@regmanabq)

    David, glad to help and glad you could recreate it. Figured it was an update thing and glad you could fix it… thought maybe I was going crazy there for a bit! LOL

    Maybe you could also help to point me in the right direction for what I want to mainly use the plug in for.. being new to WP I’m a bit confused about how it handles images and what I thought would be a simple thing seems to be more complicated than I imagined.. It seems like your plug in might do this, but so far I’ve been kind of lost. Can you point me in the right direction??

    What I want to do is provide image credits, to credit the photographers and link back to them. I have found some plug ins that modify the caption with custom fields, but it wasn’t really what I was hoping for. What I would like is more like a widget, or even to append the content at the bottom with a list of the images on a page/post with their info.

    IE:

    IMAGE CREDITS

    • Title of Featured Image – Caption – copyright by Author (link to them) Licensed: License type (maybe link to license) via Supplier (link to supplier)
    • Title of Image 1 – Caption – copyright by Author (link to them) Licensed: License type (maybe link to license) via Supplier (link to supplier)
    • Title of Image 2 – Caption – copyright by Author (link to them) Licensed: License type (maybe link to license) via Supplier (link to supplier)

    I can add the fields ok, credit_author, credit_author_link, credit_license_type, credit_license_link, credit_supplier, credit_supplier_link..

    But so far I’ve been unable to figure out how to get that data in / back out. (hopefully for many images it can be mapped on upload, but I’d also like to have fields to add the data if it’s not)

    when I upload / edit an image, I can see the fields you’ve added (metadata, featured in, inserted in, gallery in, MLA gallery in… but I don’t see my custom fields. I’d like to be able to insert / edit that data upon upload and edit and then grab the fields for all the images featured in and inserted in that page or post and display them in a widget with the MLA gallery or use a filter to display them in a block at the end of the content.

    The whole “attach” thing has me a bit confused, I’ll admit, I can get a gallery of all attached images to show, but it seems there’s no real easy way to just find all the images on a post unless they are “attached”. Since the plug in tracks the pages each image is inserted / featured in, it seems it’s possible..

    I just have not been able to figure out how to add the boxes to edit the fields and then how to get the gallery to display them in a list.

    Any advice would be much appreciated!!!

    Thread Starter regmanabq

    (@regmanabq)

    OK, so just tested the dev version on the 4.0 install and it’s still not working..

    here’s what I did: Downloaded https://downloads.www.ads-software.com/plugin/media-library-assistant.zip (dev version listed in development page)
    Removed old version (deactivate, uninstall, delete all files)
    Install new version via plug in page “add new” uploaded it, installed activated
    went to post, “add media”, uploaded test image, title already inserted (file name), added caption, alt text, description, att category, att tag
    Saved post
    went to library, edit test image

    Result: title saved fine but no data in caption, alt text or description, att category and att tag saved fine.

    Plugin Author David Lingren

    (@dglingren)

    Thanks for both of your updates, and for taking the time to try the Development Version I posted earlier today. I will respond to the questions in your first update separately, but I wanted to ask about your Development Version tests first.

    I re-tested my fix and (of course) it’s working fine on my test system. When I modify the title or add a caption and then tab to the next field I see the spinner next to the “ATTACHMENT DETAILS” title, and a “Saved.” notification when the spinner disappears. Are you seeing the spinner and the “Saved.” notification on your system? How are you moving among the fields, i.e., are you using the “tab” key, the mouse or something else? What happens if you change the caption (for example), press “tab” and then wait a few seconds before adding the ALT Text?

    The changes are made immediately by the Media Manager code; there is no need to save the post you are adding media to. You can just close the Media Manager popup window and go directly to the Media/Library or Media/Assistant pages to see the results.

    Thanks for the time you are putting into working on this with me.

    Thread Starter regmanabq

    (@regmanabq)

    ok, so… uploaded new image (went to post, hit add media, upload image)

    Then I went into the caption field and typed “test caption” and tabbed to the alt text… and I DID see the spinner for a second, but no “saved”

    went to library and could see the image, hit edit image and no caption

    went back to insert media screen, entered alt text and tabbed to description.. no spinner

    enter description and tab out.. no spinner

    and back to library… no new data

    back to insert media.. enter a test att category by clicking with mouse
    back to library and test cat saved.. same with test att tag..

    usually I don’t tab, and with all my previous tests it was by clicking into the field with a mouse.. ( I should learn to tab more! LOL_)

    Tried another image…..

    add media.. upload file… it shows up in library… modify the title and I get spinner with “saved” and then it goes away.. tab to caption.. add caption text.. spinner shows but NO saved… enter alt text.. no spinner.. enter description.. no spinner… and no data saved to library other than the changed title..

    same result with test image 3… spinner shows on title change with saved… tab to caption and just spinner.. no spinner and no saved on other fields.

    OH… just thought, i’m using Chrome, let me try Firefox…

    OK.. on firefox we get expected results…

    On each field I get spinner AND saved when tabbing… I also get spinner and saved when clicking with the mouse!!!

    and all fields saved to library via firefox v 31.

    chrome version is Version 37.0.2062.103

    Thread Starter regmanabq

    (@regmanabq)

    seems chrome and firefox both like the title field changes.. but chrome doesn’t see the other field changes.

    EDIT.. Never mind… chrome does not like the title field either.. all we get is a spinner and no save.

    Thread Starter regmanabq

    (@regmanabq)

    double checked with another image.. yes, seems firefox likes and saves changes as they happen, with tab or clicking between fields.

    but this time Chrome only gets a spinner on the title field and no saved… no spinner on any other field.

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your excellent detective work, if not for the results. There’s nothing worse than browser-specific problems! There definitely was a defect in the released version which I fixed in the Development Version.

    I would give Chrome another try, but this time “Reload this page” by clicking the circular arrow to the left of the address bar. I didn’t change the version number yet, and the old JavaScript file with the defect may be cached in your browser.

    On my Windows 7 system, Chrome version “37.0.2062.103 m” is working properly; spinning and saving without errors. Are you running on Windows or Mac?

    Thread Starter regmanabq

    (@regmanabq)

    No kidding browser specific errors can be a pain.. never even occurred to me I had the 4.0 version loaded into chrome and 3.9 in FF.. but yes, last night i was seeing the error in both versions on both browsers.

    Ok, well, i reinstalled java, checked all my settings, gave java an “allow” exemption for my domain just to be sure.. reloaded everything and VOILA!!! all seems to be working now.

    my javascript console does show an error: Denying load of chrome-extension://ncmajlpbfckecekfamgfkmckbpihjfdn/jquery.min.map. Resources must be listed in the web_accessible_resources manifest key in order to be loaded by pages outside the extension. post.php?post=90&action=edit:1

    but I get that error with or without MLA being active.. and it seems on most every page as well.. so nothing to do with MLA.

    so.. looks like yes, it was just a cache thing and the new updated dev version is working right!!!

    Awesome!!!! Thanks David!!! and I was glad to help, just sad I didn’t realize I was using chrome sooner!

    Now.. any ideas on how I can make it work the way I was hoping?? ??

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update with the good news. I am happy to hear that reloading the page/browser cache pulled in the corrected MLA code and fixed the problem. As I said, this fix will be in the next release and I will mark this topic resolved when that goes out. Thanks again for your help working through the fix.

    Now I can follow up on your “What I want to do is provide image credits …” post and questions.

    Let me re-state your idea to make sure I understand it. You have a post (or page) and you have inserted one or more images in the body of the post. You want to add a footnote or some text at the bottom of the post to credit each image back to its author and provide links to the author, license and supplier. Is that right?

    You have set up several custom fields, e.g., credit_author, credit_author_link, credit_license_type, credit_license_link, credit_supplier, credit_supplier_link, to hold the information, “But so far I’ve been unable to figure out how to get that data in / back out.”

    First, you should make sure that Custom Fields are enabled for your Posts/Edit Post screen. In the upper-right corner of the screen you should see a “Screen Options” link. Click on that and a list of “Show on screen” fields will appear; check the box to the left of Custom Fields to see your custom fields below the body of your post. That should get you some ability to enter and review the field content on the Posts/Edit Post screen.

    You can also add custom fields to the Media/Assistant submenu table, Quick Edit area and Bulk Edit area. Go to the Settings/Media Library Assistant Custom Fields tab. Scroll down to the “Add a new Mapping Rule” section and click on the first dropdown control to pick an existing custom field. Then, check one or more boxes at the right-hand side of the rule to add the field to the Media/Assistant submenu table, the Quick Edit area and/or the Bulk Edit area respectively. Click “Add Rule” to save your work. You can also add a mapping rule here or on the IPTC/EXIF tab to populate the field from data in your images as they are uploaded. See the “Custom Field and Attachment Metadata Processing Options” and “IPTC & EXIF Processing Options” sections of the Settings/Media Library Assistant Documentation tab for more information.

    You also wrote “The whole “attach” thing has me a bit confused …” That’s not surprising; WordPress has evolved quite a bit since attachments and galleries were first introduced many releases ago. The “attachment” notion and the parent post/page notion are falling out of favor since version 3.5 intorduced the Media Manager and the “ids” parameter for the [gallery] shortcode.

    You can use the [mla_gallery] shortcode to compose a “gallery” that lists all the title, author, license and supplier information for the inserted images. Here’s a simple example:

    [mla_gallery ids="1247" link=none mla_link_text="{+title+}" mla_caption="{+custom:credit_author+}<br>{+custom:credit_license_type+}<br>{+custom:credit_supplier+}"]

    You can build on this example to make the credit information into links, and you can use a custom markup template to change the HTML around each entry, add styles or classes, etc. Have a look at the Documentation tab for more information.

    The missing link is how to generate the “ids” parameter that gives the attachment ID values for the images in the body of the post/page. If you are willing to fill that information in manually, you’re done. If not, you have identified a parameter I hadn’t thought of for the [mla_gallery] shortcode. There is no existing parameter to go from a post/page to the attachment(s) inserted in the body.

    You could meet your requirements by adding some PHP code to the “mla_gallery_query_arguments” filter as described in the “MLA Gallery Filters and Actions (Hooks)” section of the Settings/Media lIbrary Assistant Documentation tab. You can pull up the body of the post/page and parse out the attachment ID values from the attributes WordPress adds to the HTML for the inserted images. Here’s and example of the HTML:

    <a href="https://mladev/wp-content/uploads/2013/10/2310.jpg"><img src="https://mladev/wp-content/uploads/2013/10/2310-150x150.jpg" alt="Barrel 2310" width="150" height="150" class="alignnone size-thumbnail wp-image-1247" /></a>

    In this example you can see wp-image-1247, where 1247 is the ID value you need. A bit of preg_match_all() code will give you a list you can pass to the [mla_gallery] shortcode. The code would go in the mla_gallery_query_arguments filter. The /media-library-assistant/examples/mla-hooks-example.php.txt` file has an example.

    I hope that gives you some ideas on how to proceed. It is a lot of information and I would be happy to expand on any of the above points and give you more specific guidance where you need it. Let me know how it goes.

    Thread Starter regmanabq

    (@regmanabq)

    David, thanks so much for the help. Yes, it seems you’ve grasped the details and parameters of my project! I”m going to go through and try this and see what happens today.

    As I go through I’ll ask some questions to clarify some things.. let’s start with these?

    1- the fields do indeed seem to be updating great! Problem fixed in dev version it seems!

    2- I did notice a difference with the att cat and att tags fields handling between the add media screen (uploading a file to attach to a post) and the set featured image (clicking set featured image in the sidebar of a post and then uploading)… on the previous we get a nice toggle which opens a box showing all the cats and we can check box the ones we want, just like categories for a post. (awesome!)… and the tags field works just like a post tag field..

    However, when uploading a featured image (on a post), one only gets a text field for each.. there is no list, no check boxes and no suggestions of most often used tags.. it seems that any att tags entered at this point will save to the database and show up in the library, but any category info is lost. In the media library though, both fields act like their post counterparts with check boxes and such…

    my question then becomes.. is this expected behavior?? It seems WP handles featured images differently so I was unsure if this might be a bug, or just part of WP… I would expect the fields to act the same no matter the location: library, post add media or post set featured image.

    3- Custom Fields – I’m a bit confused here, so bear with me.. I wasn’t able to see the field anywhere, but I think I confused myself.. Now I’ve got the field showing up in the library and the assistant and quick edit…

    My only issue now is that I don’t see that field when uploading..

    I have created the custom field inside the “custom field” tab of the plug in…

    here is an example: field Title: rr_credit_author, data source: credit, existing text: replace, format: native, mla column: true, quick edit: true, bulk edit: true, option: text, delete null value: false

    So, I guess my question becomes this: If I add the field in the plug in, is it a full fledged custom field that I can then add to the upload media screens??… and/or is there a way to automatically map/fill in that field on upload so it shows up in the edit screen without having to add it??

    right now the behavior is this.. I hope this makes sense… you upload an image and are presented with all the fields we’ve been talking about.. title -> att tags…. then you must go into the library edit or the assistant edit and add the field from the drop down presented showing all the available fields… or.. you can go into the quick edit screen and it shows up there right off… once you add it or add data to it via the quick edit, it seems to show in all edit screens.

    Sweet!!! Ok, half way there!

    looking at the codex it seems I can indeed add custom fields to the upload screens.. but again, I guess my question is ‘is this a real custom field’ according to WP if it’s created in the plug in so I can add it in the upload screens? …. I saw a meta box example php in the folder, but honestly, i was very tired and didn’t really grasp it right off.. is this where an example might be found?? LOL..

    I hope that makes sense.. I’ll poke around your meta box example in the meantime, just thought I’d ask as I go through putting this all together and had your ear.. forgive me if it’s too much, not expecting you to teach me WP!!! and I do appreciate your help.. I’m just coming over from Drupal and wow, WP can get me confused at times, but I’m starting to get the hang of it the more I poke around.

    ok, off to try getting some galleries to display.. more to come, I’m sure!

    Plugin Author David Lingren

    (@dglingren)

    I am glad to hear we’re making progress. Regarding your observations/questions:

    1- the fields do indeed seem to be updating …” Excellent. Remember to “Reload the page” to clear the old, obsolete code from your browser.

    2- I did notice a difference with the att cat and att tags fields … is this expected behavior?” No, it’s another defect. Congratulations and thanks for finding it. I have updated the Development Version with the fix. It would be great if you could download the latest code and test it out. I have added “20140909” to the plugin description so you can verify that you’re running the Development Version.

    3- Custom Fields … My only issue now is that I don’t see that field when uploading.” MLA uses all the standard WordPress custom field APIs for anything added through the plugin. Your added fields are indeed “full fledged“, but WordPress does not add custom fields to the ATTACHMENT DETAILS pane of the Media Manager Modal Window. WordPress does provide some hooks for adding fields to the ATTACHMENT DETAILS but they require PHP code to hook them and manage updates. Some other plugins, such as Advanced Custom Fields (ACF), use these hooks but I haven’t added anything to MLA for these hooks. It is an interesting idea for a future MLA version, and I will look into it (give me a few days). I don’t recommend using ACF for simple applications, but it’s quite popular.

    If you want to see some of what’s involved you can have a look at this file: /media-library-assistant/includes/class-mla-media-modal.php. In the initialize() function are some comments about the process WordPress uses to set up the Media Manager Modal Window.

    Good luck with your investigations and application adventures. Let me know if the updated Development Version solves the Set Featured Image defect.

    Thread Starter regmanabq

    (@regmanabq)

    Thanks David!! after toying with the plug in I’m starting to get it.. the templates and styles and such.. WOW… I’m starting to see the power of it all and starting to get my head around it all…

    2- awesome!! I’ll download the dev version in the morning.. it’s been a long day on four hours sleep and I’m in no frame of mind to be testing anything accurately at this point! ?? but I’ll test in the morning and let you know how it goes.

    3- again, awesome! I’ve done some poking around already this week in seeing how to add fields to the attachment details. I think I can figure it out, but yes, it might be a good option to have in the plug in as well. a simple “add your fields to the attachment details” similar to the “allow mapping on upload”?? I can see potential conflict perhaps with other plugins.. but something to think about! I”m sure I can figure out how to add custom fields to the screen regardless.

    I’ve looked into ACF but right now it’s a bit over kill for what i need to do. who knows, in the future i might need it, but right now i’m trying to limit the number of different plugins and bloat.. I”m trying to stay lean and mean, lol.. that’s one reason I was originally attracted to this plug in, it seemed to do all I needed in one plugin instead of five… (and one that seems well coded and definitely well supported!)

    Time for sleep, I’ll do that testing tomorrow and I’m sure I’ll have more questions!! (although I’m starting to answer the ones I do have now that i’m really grasping how you’ve done things and playing around with templates and such! this really is a very powerful plugin!)

    Thread Starter regmanabq

    (@regmanabq)

    David, so I checked the new dev version and featured image upload is back to normal!! I get the boxes as expected and they both seem to be working great!

    I also noticed the other thread about the cat and tags being broken in media manager on 4.0.. wanted to report that both are working for me in 4.0. (albeit mines a fresh install with few plugins)

    Now on to figuring out this template thing!

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update and all the good news. I am leaving this topic unresolved until the next MLA release goes out, but I am happy to hear the Development Version is working for you.

    If you need more specific help on the solutions outlined in the posts on this topic, let me know.

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘not saving caption / description data on upload’ is closed to new replies.