Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning "AutoForm: no theme found, please consult the README." triggered by added inputTypes #1743

Open
polygonwood opened this issue Sep 13, 2024 · 8 comments

Comments

@polygonwood
Copy link

polygonwood commented Sep 13, 2024

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');
Copy link

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

@jankapunkt
Copy link
Member

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>

@polygonwood
Copy link
Author

Hello @jankapunkt
I have added a repo here [git@github.com: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

@jankapunkt
Copy link
Member

@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

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 }

@polygonwood
Copy link
Author

polygonwood commented Sep 17, 2024 via email

@jankapunkt
Copy link
Member

Hey @polygonwood can you, if there is time, create a minimal repo that when running reproduces this issue?

@polygonwood
Copy link
Author

polygonwood commented Oct 4, 2024 via email

@jankapunkt
Copy link
Member

Ah sorry, you're right let me check again the warning tabs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants