Thanks for your report, and for including the developer console message; very helpful.
I just ran a test on my system and the add new category is working there. I found the reference to “wplist” in my code and it says there that the function is defined in the WordPress JavaScript file /wp-includes/js/wp-lists.js. Can you tell me if that script file is being loaded in your browser? Can you tell me what WordPress version you are using?
You might try refreshing the page, to reload all the JavaScript from scratch. You might also try setting define('WP_DEBUG', true ); in your wp-config.php file to load the uncompressed scripts. Any additional information you can supply will be useful.
Regarding “2) Also how can I separate these categories from posts?” You don’t say which taxonomy you are using, but I assume you are using the WordPress Categories taxonomy. The short answer is you can’t separate the terms assigned to attachments from the terms assigned to posts/pages within the WordPress Categories (or Tags) taxonomy. WordPress, by design, combines them. This is why MLA provides separate taxonomies for assigning categories and tags to Media Library items. If you use the existing WordPress Categories and Tags the counts will include both posts AND the items; WordPress cannot tell the difference. It’s not abnormal, it’s by design. You can find more information by looking for “update_count_callback” in this Codex article:
Function Reference/register taxonomy
Most MLA users use the MLA Att. Categories taxonomy for their Media Library items. Here’s another recent support topic along similar lines:
mla shortcode to show images of all posts of a WP category
I look forward to more information regarding your first issue and any further comments or questions on the second issue. Thanks for your interest in the plugin.
One other question. Are you using the standard WordPress Edit Post/Page screen, or are you using one of the many “page builders” provided by themes or plugins?
Thread Starter
Marek
(@marek_wordpress)
Hi David,
thank you for your help.
1) We are using MioWeb builder so maybe this is the issue. But I could give you login information. Could you, please check it?
[redacted]
This site is only for our demo purposes so you can try adding elements as you wish.
So you click on MioWeb -> Visit Site and then you can add the element, for example “Picture” under “Basic” tab, and then click on “Upload picture”. Then it shows the classic WordPress Insert Media pop up, where is the button “Add new category” on the right side.
I think that this approach is better than writing you additional info about my problem.
2) I already solved this problem by myself 🙂
Thank you very much.
-
This reply was modified 8 years, 1 month ago by
Marek.
-
This reply was modified 8 years, 1 month ago by
Marius L. J..
Hi there @marek_wordpress,
Please odn’t provide login credentials to users, it’s a forum guidelines violation, I’m sure it was posted with the best of intentions, but please don’t 🙂
Also, those have now been out there for over 7 hours, and are likely indexed by a large amount of sites and scrapers, please change login credentials immediately, and I would also recommend checking your site for others having accessed it and potentially modified your files.
Marek,
Thanks for confirming my suspicion that you are using a page builder plugin/theme for your application. I have adapted MLA to work with a few of these and have discovered that each one works differently. Sometimes I can help, sometimes not.
I could not find MioWeb in the WordPress Repository, but if you can supply a copy or tell me who to ask I can try installing it on my own system. That is the only sure way to investigate the work required and the possibility of success. If you give me your contact information and I will send you an email address you can use to send the information to me. You can use the Contact Us page at our web site:
Fair Trade Judaica/Contact Us
I look forward to hearing from you. Thanks for your understanding.
@clorith – Thanks for your help.
Thread Starter
Marek
(@marek_wordpress)
Hi, you can send me info to marek.kozela@gmail.com.
I also changed my login credentials immediately. I am sorry for that.
Thank you for working with me offline to investigate and resolve this issue. My testing revealed that the front-end page builder in your theme does not set the ajaxurl global variable that the WordPress wp-lists.js script depends on. This caused a fatal error in the browser and prevented the scripts from working.
The proper fix would be for the MioWeb theme to define the variable; the other page builders I have seen do this. However, the variable can be defined in your child theme to resolve the issue. Adding this code to your child theme’s “functions.php” file worked well:
function define_ajaxurl_for_mla() {
if ( class_exists( 'MLACore', false ) && ( 'checked' == MLACore::mla_get_option( MLACoreOptions::MLA_MEDIA_MODAL_TOOLBAR ) ) ) {
echo '<script type="text/javascript">' . "\n";
echo '/* <![CDATA[ */' . "\n";
echo 'var ajaxurl = "' . admin_url( 'admin-ajax.php', 'relative' ) . '";' . "\n";
echo '/* ]]> */' . "\n";
echo '</script>' . "\n";
}
}
if ( ! is_admin() ) {
add_action( 'wp_print_scripts', 'define_ajaxurl_for_mla' );
}
I am marking this topic resolved, but please update it if you have any problems or further questions regarding the above fix. Thank you for your patience and for your help with this issue!