Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Tailwind Template Path Issue #1630

Closed
CreateSean opened this issue Nov 13, 2024 · 0 comments
Closed

Tailwind Template Path Issue #1630

CreateSean opened this issue Nov 13, 2024 · 0 comments
Labels
issue Something isn't working correctly

Comments

@CreateSean
Copy link

What happened?

I copied the tailwind templates (from the docs) to my template folder in this heirarchy

_freeform
  fields
    _default.twig
    checkbox.twig
    checkboxes.twig
    dropdown.twig
    group.twig
    opinion-scale..twig
    radios.twig
    table.twig
  formatting
    main.css
    main.js
    row.twig
  site.twig

I then updated the settings for the form to use the correct freeform template

image

When I view the form on the front end i get this error:

Invalid Argument – [yii\base\InvalidArgumentException](https://www.yiiframework.com/doc-2.0/yii-base-invalidargumentexception.html)
The file or directory to be published does not exist: /_freeform/formatting/_main.css

I then updated the paths for _main.css and _main.js to match what I have and it still gives me this error:

{# CSS overrides #}
{% set cssPath = view.assetManager.publishedUrl('_freeform/formatting/_main.css', true) %}
{% do view.registerCssFile(cssPath) %}

{# JS overrides #}
{% set jsPath = view.assetManager.publishedUrl('_freeform/formatting/_main.js', true) %}
{% do view.registerJsFile(jsPath) %}

{% import "_freeform/formatting/_row.twig" as rowMacro %}

Errors and Stack Trace (if available)

No response

How can we reproduce this?

  1. update to freeform 5.7.1
  2. change formatting template from bootstrap 3 to copied tailwind templates
  3. load form

Freeform Edition

Lite

Freeform Version

5.7.1

Craft Version

4.12.8

When did this issue start?

After upgrading from older Freeform version

Previous Freeform Version

highest version 4

@CreateSean CreateSean added the issue Something isn't working correctly label Nov 13, 2024
@solspace solspace locked and limited conversation to collaborators Nov 15, 2024
@kjmartens kjmartens converted this issue into discussion #1639 Nov 15, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
issue Something isn't working correctly
Development

No branches or pull requests

1 participant