meteor-autoform
meteor-autoform copied to clipboard
Warning "AutoForm: no theme found, please consult the README." triggered by added inputTypes
Describe the bug
With AutoForm 8.0.0-rc.4, meteor 3.0.2 For each field representing an added inputType, a warning is appearing in the console AutoForm: no theme found, please consult the README.
A theme is installed (bootstrap 4) and is functional. The warning reflects probably that no default template is being found. This worked fine with @7.0.0.
To Reproduce
Add an inputType
Expected behavior
no warning should appear
Screenshots
If applicable, add screenshots to help explain your problem. Please avoid screenshots of code or error outputs and use formatted code via markdown instead.
Versions (please complete the following information):
- Meteor version: 3.0.2
- Browser: chrome
- Package version: 8.0.0-rc.4
Additional context
detailed console log of a warning message
autoform-api.js:315 AutoForm: no theme found, please consult the README.
autoFormGetTemplateName @ autoform-api.js:315
getTemplateName @ afFieldInput.js:90
(anonymous) @ lookup.js:61
(anonymous) @ exceptions.js:58
(anonymous) @ lookup.js:112
Template._withTemplateInstanceFunc @ template.js:492
(anonymous) @ lookup.js:111
Spacebars.call @ spacebars.js?hash=986169e53e97e70e23543cafe4e00fa0762d2ef4:204
(anonymous) @ aldeed_autoform.js?hash=7bce86a9c73586b10b092011d325b9c75e5ce53d:4260
wrappedArgFunc @ builtins.js:396
(anonymous) @ builtins.js:25
(anonymous) @ view.js:206
Template._withTemplateInstanceFunc @ template.js:492
(anonymous) @ view.js:204
Blaze._withCurrentView @ view.js:555
viewAutorun @ view.js:203
(anonymous) @ tracker.js:331
Tracker.withComputation @ tracker.js:640
_compute @ tracker.js:330
Computation @ tracker.js:211
Tracker.autorun @ tracker.js:602
Blaze.View.autorun @ view.js:216
(anonymous) @ builtins.js:24
fireCallbacks @ view.js:286
Tracker.withComputation @ tracker.js:640
Tracker.nonreactive @ tracker.js:625
(anonymous) @ view.js:283
Blaze._withCurrentView @ view.js:555
Blaze._fireCallbacks @ view.js:282
Blaze._createView @ view.js:300
Blaze._materializeView @ view.js:345
materializeDOMInner @ materializer.js:87
Blaze._materializeDOM @ materializer.js:25
Blaze._materializeDOM @ materializer.js:34
doMaterialize @ view.js:364
Tracker.withComputation @ tracker.js:640
Tracker.nonreactive @ tracker.js:625
doRender @ view.js:362
(anonymous) @ view.js:206
Template._withTemplateInstanceFunc @ template.js:492
(anonymous) @ view.js:204
Blaze._withCurrentView @ view.js:555
viewAutorun @ view.js:203
(anonymous) @ tracker.js:331
Tracker.withComputation @ tracker.js:640
_compute @ tracker.js:330
_recompute @ tracker.js:352
Tracker._runFlush @ tracker.js:523
onGlobalMessage @ meteor.js?hash=361c5902aa33f683ca157ee7f6436991a096184f:469
postMessage
setImmediate @ meteor.js?hash=361c5902aa33f683ca157ee7f6436991a096184f:489
requireFlush @ tracker.js:124
invalidate @ tracker.js:285
changed @ tracker.js:450
(anonymous) @ livedata_connection.js:1626
(anonymous) @ livedata_connection.js:1473
_runAfterUpdateCallbacks @ livedata_connection.js:1472
_performWritesClient @ livedata_connection.js:1462
_flushBufferedWritesClient @ livedata_connection.js:1364
_flushBufferedWrites @ livedata_connection.js:1369
_livedata_data @ livedata_connection.js:1312
await in _livedata_data
onMessage @ livedata_connection.js:1912
(anonymous) @ browser.js:185
forEachCallback @ common.js:30
socket.onmessage @ browser.js:184
r.dispatchEvent @ sockjs-1.6.1-min-.js:2
(anonymous) @ sockjs-1.6.1-min-.js:2
y._transportMessage @ sockjs-1.6.1-min-.js:2
i.emit @ sockjs-1.6.1-min-.js:2
ws.onmessage @ sockjs-1.6.1-min-.js:2
AutoForm initialization section
import 'meteor/aldeed:autoform/static'
import { AutoFormThemeBootstrap4 } from 'meteor/communitypackages:autoform-bootstrap4/static'
AutoFormThemeBootstrap4.load();
AutoForm.setDefaultTemplate('bootstrap4');
Thank you for submitting this issue!
We, the Members of Meteor Community Packages take every issue seriously. Our goal is to provide long-term lifecycles for packages and keep up with the newest changes in Meteor and the overall NodeJs/JavaScript ecosystem.
However, we contribute to these packages mostly in our free time. Therefore, we can't guarantee you issues to be solved within certain time.
If you think this issue is trivial to solve, don't hesitate to submit a pull request, too! We will accompany you in the process with reviews and hints on how to get development set up.
Please also consider sponsoring the maintainers of the package. If you don't know who is currently maintaining this package, just leave a comment and we'll let you know
Hi @polygonwood thank you for reporting. Please do not attach logs as file but post them as formatted markdown like so:
<details>
<summary>click to expand this super long log</summary>
<pre><code>
logline 1
logline 2
logline n
</code></pre>
</details>
Hello @jankapunkt I have added a repo here [[email protected]:polygonwood/repro-autoform.git] to reproduce this issue. (If you omit the custom field from the form in the repro, no messages are shown) There are other issues with my custom types but I'm trying to find a repro. regards
@polygonwood I cloned and ran the repro but I did not get into any error. What exactly do after running the app to cause the error?
This is the screen of the form I am getting when navigating to localhost:3000
Console output is
07:53:13.571
Object { _autoValues: [], _blackboxKeys: Set [], _cleanOptions: {…}, _constructorOptions: {…}, _docValidators: [], _firstLevelSchemaKeys: (4) […], _rawDefinition: null, _schema: {…}, _schemaKeys: (4) […], _validationContexts: {…}, … }
[main.js:70:12](meteor://%F0%9F%92%BBapp/client/main.js)
07:53:13.597 context
Object { name: "myfield", schemaType: Date(), min: undefined, max: undefined, value: "", atts: {…}, selectOptions: undefined }
Can you check your warnings tab ? It's not a blocking issue (it seems) but it's new since Meteor 3.0, so it's an indication of some change. I see large amounts of these messages : [image: image.png] regards Ronny
On Tue, Sep 17, 2024 at 7:59 AM Jan Küster @.***> wrote:
@polygonwood https://github.com/polygonwood I cloned and ran the repro but I did not get into any error. What exactly do after running the app to cause the error?
This is the screen of the form I am getting when navigating to localhost:3000
image.png (view on web) https://github.com/user-attachments/assets/d74cec45-b5a7-461c-ba78-5a588ba06874
Console output is
07:53:13.571 Object { _autoValues: [], _blackboxKeys: Set [], _cleanOptions: {…}, _constructorOptions: {…}, _docValidators: [], _firstLevelSchemaKeys: (4) […], _rawDefinition: null, _schema: {…}, _schemaKeys: (4) […], _validationContexts: {…}, … } main.js:70:12 07:53:13.597 context Object { name: "myfield", schemaType: Date(), min: undefined, max: undefined, value: "", atts: {…}, selectOptions: undefined }
— Reply to this email directly, view it on GitHub https://github.com/Meteor-Community-Packages/meteor-autoform/issues/1743#issuecomment-2354597222, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMTJC2ZG4YYHD3VWEHMGDX3ZW7AKXAVCNFSM6AAAAABOE4G6USVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJUGU4TOMRSGI . You are receiving this because you were mentioned.Message ID: @.*** com>
Hey @polygonwood can you, if there is time, create a minimal repo that when running reproduces this issue?
Jan I did provide a repe. It's not an error but a warning which is thrown. regards Ronny
On Fri, Oct 4, 2024 at 9:54 AM Jan Küster @.***> wrote:
Hey @polygonwood https://github.com/polygonwood can you, if there is time, create a minimal repo that when running reproduces this issue?
— Reply to this email directly, view it on GitHub https://github.com/Meteor-Community-Packages/meteor-autoform/issues/1743#issuecomment-2393067561, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMTJC26BEGKR5AKSHKUTSPTZZZCR5AVCNFSM6AAAAABOE4G6USVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJTGA3DONJWGE . You are receiving this because you were mentioned.Message ID: @.*** com>
Ah sorry, you're right let me check again the warning tabs
Having the same issue while being on 7.0.0! and Meteor 2.16 - I'm actually tracing the source of this, but it seems like I do have a bunch of custom input types we are adding as well - it seems like even though the theme is loaded statically beforehand it doesn't seem to apply to those custom inputs.
Is there any resolution for this ?
Even having the option to pass the default theme through some other means might be fine.