flojdm
Forum Replies Created
-
Hey, thanks for the quick response!
While waiting to hear back from the dev team, I explored the plugin source code to understand how Forminator handles mail sending internally, and I managed to get everything working.
After creating the entry with
Forminator_API::add_form_entry, I manually retrieved the latest entry and invoked the internal mail handler like this:$result = Forminator_API::add_form_entry( $form->id, $meta );
$entry = Forminator_Form_Entry_Model::get_latest_entry_by_form_id($form->id);
$entry_id = $entry->entry_id;
$forminator_mail_sender = new Forminator_CForm_Front_Mail();
$entry = new Forminator_Form_Entry_Model( $entry_id );
if ( empty( $entry->form_id ) || ! empty( $entry->draft_id ) ) {
wp_send_json_error( esc_html__( 'Entry ID was not found.', 'forminator' ) );
}
$module_id = $entry->form_id;
Forminator_Front_Action::$module_id = $module_id;
Forminator_Front_Action::$module_object = Forminator_Base_Form_Model::get_model( $module_id );
Forminator_Front_Action::$prepared_data = recreate_prepared_data( Forminator_Front_Action::$module_object, $entry );
if ( ! Forminator_Front_Action::$module_object ) {
wp_send_json_error( esc_html__( 'Error: Module object is corrupted!', 'forminator' ) );
}
Forminator_Front_Action::$module_settings = method_exists( Forminator_Front_Action::$module_object, 'get_form_settings' )
? Forminator_Front_Action::$module_object->get_form_settings() : Forminator_Front_Action::$module_object->settings;
Forminator_CForm_Front_Action::check_fields_visibility();
$module_object = Forminator_Base_Form_Model::get_model( $module_id );
$forminator_mail_sender->process_mail( $module_object, $entry );
return ['error' => false];This allowed me to simulate the full frontend submission flow and trigger email notifications as expected (both to the admin and the user). Everything works perfectly now.
Hope this helps someone else in the meantime!
Let me know if you’d like a cleaner utility function for this in a future release.
Best regards,I’m experiencing exactly the same issue! With Yoast enabled, updating a post takes between 20 to 30 seconds. Disabling Yoast reduces it to around 4 seconds. I’ve been troubleshooting extensively with my hosting provider (PlanetHoster), adjusting database settings like:
planetHosterhosting (MariaDB & MySQL)- Adjustments on
innodbsettings (innodb_buffer_pool,innodb_log_file_size, etc.) - Fine-tuning various server parameters recommended by Yoast guidelines.
- Php updated from 8.0 to 8.2
- Database tables were converted from MyISAM to InnoDB
However, after applying these recommendations, saving a post now takes even longer—around 55 seconds!
Clearly, there’s an incompatibility between Yoast and recent MariaDB versions, making the plugin unusable in production environments.
Please prioritize this issue; it significantly affects productivity on large websites.
Forum: Plugins
In reply to: [Admin Columns] “OR” condition with filtersAfter searching a lot I’ve found a way to do it but encountering an issue with the meta query generation in the
query.phpfile within theadmin-column-pro/Classesdirectory. Despite my efforts to modify the code, I’m facing difficulties with combining multiple entity IDs in the meta query.<?php namespace ACP; use AC\Registerable; use ACP\Query\Bindings; use LogicException; abstract class Query implements Registerable { /** * @var Bindings[] */ protected $bindings; /** * @param Bindings[] $bindings */ public function __construct(array $bindings) { $this->bindings = $bindings; $this->validate_bindings(); } /** * @throws LogicException */ private function validate_bindings(): void { foreach ($this->bindings as $bindings) { if ( ! $bindings instanceof Bindings) { throw new LogicException('Expected Bindings object.'); } } } protected function get_meta_query(): array { $meta_query = []; $entities_ids = []; foreach ($this->bindings as $binding) { $args = $binding->get_meta_query(); if ($args["key"] == "entity_id") { $entity_id = (int) unserialize($args["value"]); $entities_ids[] = $entity_id; } else { $meta_query[] = $binding->get_meta_query(); } } $meta_query = array_filter($meta_query); if ($entities_ids) { $entity_meta_queries = []; foreach ($entities_ids as $entity_id) { $entity_meta_queries[] = [ 'key' => 'entity_id', 'value' => $entity_id, 'compare' => 'LIKE', ]; } $meta_query[] = [ 'relation' => 'OR', $entity_meta_queries, ]; } $meta_query[] = [ 'relation' => 'AND', ]; return $meta_query; } }Then query :
array(3) { [0]=> array(4) { [“key”]=> string(6) “source” [“value”]=> string(6) “import” [“compare”]=> string(1) “=” [“type”]=> string(4) “CHAR” } [1]=> array(2) { [“relation”]=> string(2) “OR” [0]=> array(2) { [0]=> array(3) { [“key”]=> string(20) “entity_id” [“value”]=> int(3206) [“compare”]=> string(4) “LIKE” } [1]=> array(3) { [“key”]=> string(20) “entity_id” [“value”]=> int(2991) [“compare”]=> string(4) “LIKE” } } } [2]=> array(1) { [“relation”]=> string(3) “AND” } } array(1) { [0]=> array(1) { [“relation”]=> string(3) “AND” } }
While the meta query seems to be correct individually, it doesn’t work as expected when combining multiple entity IDs. However, it works fine when I only use one entity ID.
Any idea on how to fix this?Thank you for your attention to this matter.
- This reply was modified 1 year, 10 months ago by flojdm.
Forum: Plugins
In reply to: [Admin Columns] “OR” condition with filtersI just saw that someone had already asked this question and you said it wasn’t possible but please is there any way to do this ? Maybe with a filter for a specific column ?
Hi there,
I have quickly fix my problem by simply copied the contents of the CSS file generated in the root directory and pasted it into the “style.css” file of my child theme. In my case, the file was located at: “public_html/4575_6313cf3050e68233c2573fad6073dedd/css/style-4575.css”.I exhausted all possible solutions to fix the problem, including disabling themes and plugins, as well as clearing browser cache. Unfortunately, none of these actions proved successful in resolving the error.
Best regards,Forum: Plugins
In reply to: [Advanced Forms for ACF] Hide Field in FormForum: Plugins
In reply to: [Elementor Custom Skin] Sort by “Menu order” creates duplicates@dudaster Please, fix this problem for which you have not yet given a valid answer on any other post.