Support » Plugin: Media Library Assistant » Custom Fields not showing up in Assistant

  • Resolved IslandOwl


    Hi David,

    I followed your instructions from this ticket: Show Image Size to create custom fields for both file_size and size-dimensions. Both seemed to work but they are not showing up as columns in the Media>Assistant table. Neither shows up at all.

    The custom field mapping showed the progress bar all the way to 100%. The custom fields show on Settings>Media Library Assistant>Custom Fields>Custom Fields Mapping.

    I have emptied all caches but that made no difference.

    Ps. What a cool nonprofit! Yes I will donate – before the end of the year. I also sent it on to some friends at my synagogue.

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


    Thanks for the kind words and for your question. Thanks especially for the offer to donate to our work; much appreciated!

    Regarding the invisible custom fields, there are two quick things you can check.

    First, make sure the “MLA Column” box is checked for the fields you’ve added. It’s the first of three checkboxes just to the right of the Format/Native dropdown control. If it’s not checked, check the box and click “Update rule” to record your new settings.

    Second, make sure the fields are selected for the Media/Assistant submenu table. Click on the “Screen Options” in the upper-right of the screen and look for your fields in the Columns list. Check the box to the left of the field name to add it to the table.

    Finally, if you are running the “Admin Columns” plugin you must reset the MLA field list to get the new fields to show up.

    You can also verify that the fields exist by going to the Media/Edit Media screen for one of your items and scrolling down through the Custom Fields area to see if the fields are there.

    Let me know if that helps. If not, we can investigate further.

    Thank you David. I checked everything you suggested. Then I changed the “MLA Gallery in” to “Dynamic”. Now it is working. I will change it to Cache once I am done with the work I am doing in my Media Library.

    Whoops! I never hit submit here!

    One other related question: Is there anyway to make it show kilobytes instead of bytes?

    I did try using size_kilobytes but as I expected it did not work. Is there a way I could add/create a shortecode for size_bytes divided by 1000? (I am only marginally techie.)


    Plugin Author David Lingren


    Thanks for your update on the custom field display issue and for your new question.

    Regarding the custom fields, I am not sure the “MLA Gallery in” setting was the solution. That option controls MLA’s “where-used” reporting but I do not see how it could affect other custom field rules you have set up. Try changing it back to “disabled” and let me know if the other fields still work.

    Regarding your “related question“, the file size formatting question has come up before:

    Display file size (kb or MB) trough mla-hooks.php in /plugins directory

    MLA has changed a lot since then and my current answer would be somewhat different. I would implement a “custom option/format” using the “Field-level substitution parameter filters (Hooks)” that were added a short while back. You would still need a small custom plugin to do the job, but it’s not too technical.

    If that is of interest I can develop the code and share it with you by email. Once you’ve tested it I will add it to the Examples directory and post an update here. You can use the Contact Us page at our web site:

    Fair Trade Judaica/Contact Us

    Do not post your e-mail address in the forum; personal details in a public forum violates WordPress guidelines. I look forward to hearing from you.

    Thank you David. I will be in touch later today; likely not until evening my time.

    Plugin Author David Lingren


    After mulling it over I came to the conclusion that since this feature has come up multiple times over the years it’s worth adding to the MLA standard features. I have added a new “kbmb” format; here’s the definition in the “Field-level option/format values” section of the Settings/Media Library Assistant Documentation tab:

    ,kbmb(t,k,m)” Some data values, e.g., file size, are better expressed in kilobytes and megabytes. The “kbmb” format provides this conversion. There are three optional arguments; “t” (threshold), “k” (kilobyte suffix) and “m” (megabyte suffix). The threshold argument (default 10240; ten kilobytes) sets the dividing amount between bytes and kilobytes. For example, a value of 1536 bytes would display as “1,536”, not “1.50 KB” and 15360 bytes would display as “15.5 KB”. The “k” and “m” arguments replace the default ” KB” and/or ” MB” suffix displayed following the numeric value.

    I have uploaded a new MLA Development Version dated 20160725 that contains the new format/option value. To get the Development Version, follow the instructions in this earlier topic:

    Shortcode not working in (special) widget

    It would be great if you can install the Development Version and let me know how it works for you. Thanks for your help and for your patience.

    David, thank you so much!! That is great.

    Yes, I will install the Development Version later today and let you know how it goes.

    I will reply in detail to the email you sent me if I find any bugs. (I beta test a fair amount so am good at documenting bugs.)

    David, I tried to send you an email on your contact us page but it does not look like it did anything.

    I will test out the development version tomorrow. Thank you for your patience.

    David, I am not understanding how to make use of the ,kbmb(t,k,m). I can find the part that you quoted on the Documentation tab, but do not understand what I do with it!

    Though I do beta-test, I do it from the user standpoint. I am a self-taught techie-have-to-be and hang on by my fingertips .


    Plugin Author David Lingren


    Thanks for getting in touch with me through the Contact Us page and for working with me offline to make use of the new ,kbmb(t,k,m) option/format value. Here’s a summary of the solution:

    You wrote “the custom field I created for file_size“. I understand that to mean that you used the Settings/Media Library Assistant Custom Fields tab to create a mapping rule to create your field.

    If that’s right, go back to the Custom Fields tab and add the “kbmb” option to your rule. You will have to change the “Data Source” to ” – Template (see below) – ” and then enter this in the text box just below the dropdown:


    Make sure the “Existing Text” control is set to “Replace”. Then click the “Update Rule” button. When the screen refreshes, click the “Map All Attachments” button for that rule to update the content of your custom field.

    I realize now that the change to a template isn’t obvious!

    Thanks for working with me on inspiring and testing this new MLA enhancement. I will mark this topic resolved when the new feature goes out in the next MLA version.

    Plugin Author David Lingren


    I have released MLA Version 2.32, which includes the new option/format value that supports your application. I am marking this topic resolved, but please update it if you have any problems or further questions regarding the solution outlined above. Thank you for your interest in the plugin.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Custom Fields not showing up in Assistant’ is closed to new replies.