CMS MADE SIMPLE FORGE

MC Factory

 

[#8073] When creating a Module, MC Factory throws an error if you don't save/publish it before adding content / A la création d'un module, MC Factory renvoie une erreur si celui n'est pas enregistré vide une première fois avant d'ajouter des champs

avatar
Created By: Camille Ascencio-Parvy (cascencio)
Date Submitted: Mon Jun 25 07:31:19 -0400 2012

Assigned To: Jean-Christophe Cuvelier (totophe)
Version: MCFactory 3.1.14
CMSMS Version: 1.10.3
Severity: Minor
Resolution: Accepted
State: Closed
Summary:
When creating a Module, MC Factory throws an error if you don't save/publish it before adding content / A la création d'un module, MC Factory renvoie une erreur si celui n'est pas enregistré vide une première fois avant d'ajouter des champs
Detailed Description:
In the previous version2 of MC Factory, when creating a module, the standard
behavior was for the user to create both the module name and all the fields the
module was going to contain in a single step, at the end of which the user would
save the new module.

Starting from version 3, the user must save or publish an empty module first,
before being able to add new fields. If a user attemps to add a field to a
module directly when creating the module, MC Factory will throm the following
error:

array(9) { ["module_id"]=> string(0) "" ["tab_key"]=> string(7) "default"
["fieldset_key"]=> string(7) "default" ["name"]=> string(0) "" ["type"]=>
string(4) "text" ["label"]=> string(5) "fruda" ["type_select"]=> string(4)
"text" ["options"]=> string(0) "" ["action"]=> string(12) "manage_field" } An
error occurred. Did you save your module first ? Please try again.

In this specific case, I believe the bug doesn't lie so much this new behaviour
than in the fact that it is not clearly stated beforehand, or when throwing the
error (ie: displaying a message that says bluntly 'You must save your module
before inserting any field", and skipping the array thingie).


------------------ En français ----------------------

Dans le comportement des version 2..., lors de la création d'un module, on
effectuait la création complète de tous les champs en une seule étape, puis l'on
sauvegardait le contenu.

A partir de la version 3, si l'on a pas sauvegardé ou publié le module une
première fois avec uniquement le 'Title', dès qu'on tente d'ajouter un champs au
module, MC Factory renvoie l'erreur suivante :

array(9) { ["module_id"]=> string(0) "" ["tab_key"]=> string(7) "default"
["fieldset_key"]=> string(7) "default" ["name"]=> string(0) "" ["type"]=>
string(4) "text" ["label"]=> string(5) "fruda" ["type_select"]=> string(4)
"text" ["options"]=> string(0) "" ["action"]=> string(12) "manage_field" } An
error occurred. Did you save your module first ? Please try again.

En fait ici, je pense que le bug mineur c'est plus de n'avoir pas mentionné
cette étape préalable, et de ne pas l'encadrer avec un message d'erreur plus
explicite (et sans l'array :) ) du style 'You must save your module before
inserting any field'.


History

Comments
avatar
Date: 2013-06-27 11:59
Posted By: Jean-Christophe Cuvelier (totophe)

From now, if you do not name your module before adding fields, it will name it
"Module" by default to avoid errors.
      
avatar
Date: 2013-06-27 12:16
Posted By: Jean-Christophe Cuvelier (totophe)

==> It will be present in the next version (3.4.18 or higher)
      
Updates

Updated: 2013-06-27 11:59
resolution_id: => 6
state: Open => Closed