silverstripe / silverstripe-userforms

UserForms module provides a visual form builder for the Silverstripe CMS. No coding required to build forms such as contact pages.
BSD 3-Clause "New" or "Revised" License
135 stars 225 forks source link

UserDefinedForm table doesn't exists #856

Open a2nt opened 5 years ago

a2nt commented 5 years ago

UserDefinedForm::get()->byID($formID); throws an error:

Table 'dev.UserDefinedForm' doesn't exist

SilverStripe\ORM\DataList->byID(12) EmailRecipient.php:154

Checked DB that's true that UserDefinedForm table doesn't exists and it looks weird. Tried /dev/build?flush the table wasn't created

composer info:

axllent/silverstripe-bootstrap-forms              2.0.3              An extension to add CSS classes to Sil...
axllent/silverstripe-version-truncator            2.0.3              Automatically delete old SiteTree page...
betterbrief/silverstripe-googlemapfield           v2.2.1             Save locations using latitude/longitud...
colymba/gridfield-bulk-editing-tools              dev-master 5581c11 SilverStripe GridField component to up...
composer/ca-bundle                                1.1.4              Lets you find a path to the system CA ...
composer/installers                               v1.6.0             A multi-framework Composer library ins...
dnadesign/silverstripe-elemental                  3.1.1              Elemental pagetype and collection of E...
dnadesign/silverstripe-elemental-list             1.1.0              Adds a new element for nested elements
dnadesign/silverstripe-elemental-userforms        2.0.0              Adds a new element for usersforms
dnadesign/silverstripe-elemental-virtual          1.2.0              Adds ability for Elemental to share co...
doctrine/instantiator                             1.1.0              A small, lightweight utility to instan...
drmartingonzo/ss-tinymce-charcount                1.1.0              Plugin for tinyMCE in siverstripe to c...
dynamic/flexslider                                3.0.4              Display a FlexSlider on pages of your ...
dynamic/silverstripe-elemental-accordion          1.0.1              Display content in collapsable panels
dynamic/silverstripe-elemental-baseobject         1.0.1              A simple base DataObject to use with E...
dynamic/silverstripe-elemental-blocks             2.0.1              A recipe to require additonal elements...
dynamic/silverstripe-elemental-blog               1.0.1              A blog element for the SilverStripe El...
dynamic/silverstripe-elemental-countdown          1.0.0              Countdown element for the SilverStripe...
dynamic/silverstripe-elemental-customer-service   1.0.1              Additional customer service element fo...
dynamic/silverstripe-elemental-embedded-code      1.0.1              A block to embed code like iFrames or ...
dynamic/silverstripe-elemental-features           1.0.1              A block that displays featured content...
dynamic/silverstripe-elemental-flexslider         1.0.2              Flexslider slideshow content block for...
dynamic/silverstripe-elemental-gallery            1.0.2              A block to display a collection of images
dynamic/silverstripe-elemental-image              1.0.2              A block to add a single image to your ...
dynamic/silverstripe-elemental-oembed             1.0.1              A block to embed media from other webs...
dynamic/silverstripe-elemental-promos             1.0.2              A block to display a group of promo ob...
dynamic/silverstripe-elemental-section-navigation 1.0.2              A block to display a list of links to ...
dynamic/silverstripe-elemental-sponsors           1.0.1              Display a list of sponsor logos with l...
dynamic/silverstripe-elemental-testimonials       1.0.2              Testimonials element for the SilverStr...
dynamic/silverstripe-geocoder                     dev-master 234ec4c SilverStripe wrapper for Geocoder
egeloen/http-adapter                              0.8.0              Issue HTTP request for PHP 5.3+.
embed/embed                                       v3.3.7             PHP library to retrieve page info usin...
firesphere/googlemapsfield                        dev-master ecf39a4 Google places api field for SilverStripe
gorriecoe/silverstripe-dataobjecthistory          1.2.2              Adds a history tab to dataobjects
guzzlehttp/psr7                                   1.5.2              PSR-7 message implementation that also...
igorw/get-in                                      v1.0.3             Functions for for hash map (assoc arra...
innoweb/silverstripe-sitemap                      2.1.1              Adds a page type that automatically bu...
intervention/image                                2.4.2              Image handling and manipulation librar...
jdorn/sql-formatter                               dev-master 7ef9b85 a PHP SQL highlighting library
jonom/silverstripe-betternavigator                4.1.1              Front-end utility menu for SilverStrip...
league/csv                                        8.2.3              Csv data manipulation made easy in PHP
league/flysystem                                  1.0.49             Filesystem abstraction: Many filesyste...
lekoala/silverstripe-debugbar                     2.0.1              DebugBar for SilverStripe CMS
m1/env                                            2.1.2              Env is a lightweight library bringing ...
marcj/topsort                                     1.1.0              High-Performance TopSort/Dependency re...
maximebf/debugbar                                 v1.15.0            Debug bar in the browser for php appli...
monolog/monolog                                   1.24.0             Sends your logs to files, sockets, inb...
myclabs/deep-copy                                 1.8.1              Create deep copies (clones) of your ob...
nikic/php-parser                                  v4.2.0             A PHP parser written in PHP
paragonie/random_compat                           v2.0.18            PHP 5.x polyfill for random_bytes() an...
phar-io/manifest                                  1.0.3              Component for reading phar.io manifest...
phar-io/version                                   2.0.1              Library for handling version informati...
phpdocumentor/reflection-common                   1.0.1              Common reflection classes used by phpd...
phpdocumentor/reflection-docblock                 4.3.0              With this component, a library can pro...
phpdocumentor/type-resolver                       0.4.0             
phpspec/prophecy                                  1.8.0              Highly opinionated mocking framework f...
phpunit/php-code-coverage                         6.1.4              Library that provides collection, proc...
phpunit/php-file-iterator                         2.0.2              FilterIterator implementation that fil...
phpunit/php-text-template                         1.2.1              Simple template engine.
phpunit/php-timer                                 2.0.0              Utility class for timing
phpunit/php-token-stream                          3.0.1              Wrapper around PHP's tokenizer extension.
phpunit/phpunit                                   7.5.2              The PHP Unit Testing framework.
psr/cache                                         1.0.1              Common interface for caching libraries
psr/container                                     1.0.0              Common Container Interface (PHP FIG PS...
psr/http-message                                  1.0.1              Common interface for HTTP messages
psr/log                                           1.1.0              Common interface for logging libraries
psr/simple-cache                                  1.0.1              Common interfaces for simple caching
ralouphie/getallheaders                           2.0.5              A polyfill for getallheaders.
sebastian/code-unit-reverse-lookup                1.0.1              Looks up which function or method a li...
sebastian/comparator                              3.0.2              Provides the functionality to compare ...
sebastian/diff                                    3.0.1              Diff implementation
sebastian/environment                             4.0.2              Provides functionality to handle HHVM/...
sebastian/exporter                                3.1.0              Provides the functionality to export P...
sebastian/global-state                            2.0.0              Snapshotting of global state
sebastian/object-enumerator                       3.0.3              Traverses array structures and object ...
sebastian/object-reflector                        1.1.1              Allows reflection of object attributes...
sebastian/recursion-context                       3.0.0              Provides functionality to recursively ...
sebastian/resource-operations                     2.0.1              Provides a list of PHP built-in functi...
sebastian/version                                 2.0.1              Library that helps with managing the v...
sheadawson/silverstripe-dependentdropdownfield    2.0.0              A silverstripe dropdown field that has...
sheadawson/silverstripe-linkable                  2.0.0              A couple of handy form fields and obje...
silverstripe/admin                                1.3.0              SilverStripe admin interface
silverstripe/asset-admin                          1.3.0              Asset management for the SilverStripe CMS
silverstripe/assets                               1.3.0              SilverStripe Assets component
silverstripe/blog                                 3.2.3              A fresh take on blogging in Silverstri...
silverstripe/campaign-admin                       1.3.0              SilverStripe campaign admin interface
silverstripe/cms                                  4.3.0              The SilverStripe Content Management Sy...
silverstripe/config                               1.0.9              SilverStripe configuration based on YA...
silverstripe/errorpage                            1.3.0              ErrorPage component for SilverStripe CMS
silverstripe/externallinks                        2.0.3              Adds tracking of broken external links...
silverstripe/framework                            4.3.0              The SilverStripe framework
silverstripe/graphql                              3.0.0              GraphQL server for SilverStripe models...
silverstripe/lumberjack                           2.0.1              A module to make managing pages in a G...
silverstripe/recaptcha                            dev-master 6c839da Provides a form field which allows for...
silverstripe/recipe-cms                           4.3.0              SilverStripe recipe for fully featured...
silverstripe/recipe-core                          4.3.0              SilverStripe framework-only core recipe
silverstripe/recipe-plugin                        1.3.0              Helper plugin to install SilverStripe ...
silverstripe/redirectedurls                       dev-master 042ece4 Provides a system for users to configu...
silverstripe/reports                              4.3.0              Reports module for SilverStripe CMS
silverstripe/segment-field                        2.2.2              A reusable approach to segment-generat...
silverstripe/siteconfig                           4.3.0              Site wide settings administration.
silverstripe/spamprotection                       3.0.1              Spam protection module for SilverStripe.
silverstripe/tagfield                             2.2.1              Tag field for SilverStripe
silverstripe/userforms                            5.3.0              UserForms enables CMS users to create ...
silverstripe/vendor-plugin                        1.4.0              Allows vendor modules to expose direct...
silverstripe/versioned                            1.3.0              SilverStripe Versioned component
silverstripe/versioned-admin                      1.1.0              SilverStripe versioned admin interface
stevie-mayhew/silverstripe-svg                    2.1.0              Basic SVG support for SilverStripe
swiftmailer/swiftmailer                           v5.4.12            Swiftmailer, free feature-rich PHP mailer
symbiote/silverstripe-gridfieldextensions         3.2.1              A collection of useful grid field comp...
symfony/cache                                     v3.4.21            Symfony Cache component with PSR-6, PS...
symfony/config                                    v3.4.21            Symfony Config Component
symfony/filesystem                                v4.2.2             Symfony Filesystem Component
symfony/finder                                    v3.4.21            Symfony Finder Component
symfony/polyfill-apcu                             v1.10.0            Symfony polyfill backporting apcu_* fu...
symfony/polyfill-ctype                            v1.10.0            Symfony polyfill for ctype functions
symfony/polyfill-mbstring                         v1.10.0            Symfony polyfill for the Mbstring exte...
symfony/polyfill-php72                            v1.10.0            Symfony polyfill backporting some PHP ...
symfony/translation                               v2.8.49            Symfony Translation Component
symfony/var-dumper                                v4.2.2             Symfony mechanism for exploring and du...
symfony/yaml                                      v3.4.21            Symfony Yaml Component
theseer/tokenizer                                 1.1.0              A small library for converting tokeniz...
tractorcow/classproxy                             0.1.2             
tractorcow/silverstripe-proxy-db                  0.1.0             
unclecheese/display-logic                         2.0.2              Allows assignment of conditions for di...
undefinedoffset/silverstripe-nocaptcha            2.0.0              A spam protector and form field using ...
undefinedoffset/sortablegridfield                 2.0.8              Adds drag and drop functionality to Si...
webmozart/assert                                  1.4.0              Assertions to validate method input/ou...
webonyx/graphql-php                               v0.8.0             A PHP port of GraphQL reference implem...
willdurand/geocoder                               v3.3.0             The almost missing Geocoder PHP 5.4 li...
wilr/silverstripe-googlesitemaps                  2.1.3              SilverStripe support for the Google Si...
zendframework/zend-diactoros                      1.8.6              PSR HTTP Message implementations
a2nt commented 5 years ago

still having the same issue, tried to rename class at src/Models/UserDefinedForm.php class UserDefinedForm to class UserDefinedFormTmp The table was created

robbieaverill commented 5 years ago

Are you still experiencing this issue? I don't see why the UserDefinedForm model wouldn't build a DB table, since it inherits some database field specs from UserFormFieldEditorExtension. Do you have any steps to reproduce? We use userforms regularly in our team, and perform dev/builds regularly, and haven't come across this issue before.

a2nt commented 4 years ago

Still getting this issue at SilverStripe\UserForms\Model\Recipient\EmailRecipient::getFormParent() To reproduce: 1) Disable UserDefinedForm page type by injector

SilverStripe\Core\Injector\Injector:
  SilverStripe\UserForms\Model\UserDefinedForm:
    class: Site\Extensions\CMSMain_HiddenClass 

2) Create data object

class ElementForm extends DataObject
{
    use UserForm;

    private static $table_name = 'ElementForm';
}

3) Everything works ok, but try to add new recipient and you will get the same issue