Skip to content
This repository has been archived by the owner on Aug 19, 2020. It is now read-only.

No toggle fields available #8

Open
shantamg opened this issue Jun 14, 2019 · 11 comments
Open

No toggle fields available #8

shantamg opened this issue Jun 14, 2019 · 11 comments

Comments

@shantamg
Copy link

I have tried just about everything but when I click the gear next to any field and choose Edit Conditionals, the resulting window says "No toggle fields available." when there are clearly many fields that are lightswitches.

@Slgoetz
Copy link
Member

Slgoetz commented Jun 19, 2019

Can you let me know your field structure for that section?

@shantamg
Copy link
Author

It's a pretty new site, just starting development, so I can post my entire config/project.yaml file and composer.json file. There's only one section, which has a few fields.

config/project.yaml

dateModified: 1560973434
email:
  fromEmail: $SYSTEM_EMAIL
  fromName: 'MMC Media'
  template: null
  transportType: craft\mail\transportadapters\Gmail
  transportSettings:
    username: $SYSTEM_EMAIL
    password: $SYSTEM_EMAIL_PASS
    timeout: '10'
fieldGroups:
  f6f76405-1cff-44eb-b6a6-0aa3f7b9a3f2:
    name: Common
fields:
  4e06d84e-85ed-44f9-b385-b0b588356454:
    name: Heading
    handle: heading
    instructions: ''
    searchable: true
    translationMethod: none
    translationKeyFormat: null
    type: craft\fields\PlainText
    settings:
      placeholder: ''
      code: ''
      multiline: ''
      initialRows: '4'
      charLimit: ''
      columnType: text
    contentColumnType: text
    fieldGroup: f6f76405-1cff-44eb-b6a6-0aa3f7b9a3f2
  64546590-b2fc-44a4-86a7-f8ec6e909ddd:
    name: Body
    handle: body
    instructions: ''
    searchable: true
    translationMethod: none
    translationKeyFormat: null
    type: craft\redactor\Field
    settings:
      redactorConfig: ''
      purifierConfig: ''
      cleanupHtml: true
      removeInlineStyles: '1'
      removeEmptyTags: '1'
      removeNbsp: '1'
      purifyHtml: '1'
      columnType: text
      availableVolumes: '*'
      availableTransforms: '*'
    contentColumnType: text
    fieldGroup: f6f76405-1cff-44eb-b6a6-0aa3f7b9a3f2
  9ec230ad-34f9-46ba-a60c-5b515d053189:
    name: Files
    handle: files
    instructions: ''
    searchable: true
    translationMethod: site
    translationKeyFormat: null
    type: craft\fields\Assets
    settings:
      useSingleFolder: ''
      defaultUploadLocationSource: 'volume:172d9e50-9547-418f-997a-7f5ee177eb3b'
      defaultUploadLocationSubpath: ''
      singleUploadLocationSource: 'volume:172d9e50-9547-418f-997a-7f5ee177eb3b'
      singleUploadLocationSubpath: ''
      restrictFiles: ''
      allowedKinds: null
      sources:
        - 'volume:172d9e50-9547-418f-997a-7f5ee177eb3b'
      source: null
      targetSiteId: null
      viewMode: list
      limit: ''
      selectionLabel: 'Add files'
      localizeRelations: false
    contentColumnType: string
    fieldGroup: f6f76405-1cff-44eb-b6a6-0aa3f7b9a3f2
  2c4fb3f7-e2aa-4883-b1cc-d5c87732d566:
    name: 'Show Stuff'
    handle: showStuff
    instructions: ''
    searchable: true
    translationMethod: none
    translationKeyFormat: null
    type: craft\fields\Lightswitch
    settings:
      default: ''
    contentColumnType: boolean
    fieldGroup: f6f76405-1cff-44eb-b6a6-0aa3f7b9a3f2
plugins:
  redactor:
    edition: standard
    enabled: true
    schemaVersion: 2.3.0
  aws-s3:
    edition: standard
    enabled: true
    schemaVersion: '1.2'
  conditions:
    edition: standard
    enabled: true
    schemaVersion: 1.0.0
sections:
  8f21a2f6-c0ce-4bc0-82e3-33f1bcb45103:
    name: Home
    handle: home
    type: single
    enableVersioning: true
    propagateEntries: true
    siteSettings:
      725443b6-47d5-4230-9bd0-92441539cb07:
        enabledByDefault: true
        hasUrls: true
        uriFormat: __home__
        template: home/_entry
    entryTypes:
      e89005cd-2d1a-4336-918a-55f68e11318b:
        name: Home
        handle: home
        hasTitleField: false
        titleLabel: Title
        titleFormat: Home
        sortOrder: 1
        fieldLayouts:
          1a9ff3d8-6eb9-46d3-8d1a-a04aeacd1968:
            tabs:
              -
                name: Content
                sortOrder: 1
                fields:
                  2c4fb3f7-e2aa-4883-b1cc-d5c87732d566:
                    required: false
                    sortOrder: 1
                  4e06d84e-85ed-44f9-b385-b0b588356454:
                    required: false
                    sortOrder: 2
                  64546590-b2fc-44a4-86a7-f8ec6e909ddd:
                    required: false
                    sortOrder: 3
                  9ec230ad-34f9-46ba-a60c-5b515d053189:
                    required: false
                    sortOrder: 4
siteGroups:
  7827a75b-abee-4b07-a49e-035c30bb77b0:
    name: 'MMC Media'
sites:
  725443b6-47d5-4230-9bd0-92441539cb07:
    siteGroup: 7827a75b-abee-4b07-a49e-035c30bb77b0
    name: 'MMC Media'
    handle: default
    language: en-US
    hasUrls: true
    baseUrl: $DEFAULT_SITE_URL
    sortOrder: 1
    primary: true
system:
  edition: solo
  live: true
  name: 'MMC Media'
  schemaVersion: 3.1.28
  timeZone: America/Los_Angeles
users:
  allowPublicRegistration: false
  defaultGroup: null
  photoSubpath: ''
  photoVolumeUid: null
  requireEmailVerification: true
volumes:
  172d9e50-9547-418f-997a-7f5ee177eb3b:
    name: Files
    handle: files
    type: craft\awss3\Volume
    hasUrls: false
    url: 'https://s3.us-west-1.amazonaws.com/mmc-media-test/'
    settings:
      subfolder: ''
      keyId: $AWS_ACCESS_KEY_ID
      secret: $AWS_SECRET_ACCESS_KEY
      bucketSelectionMode: choose
      bucket: mmc-media-test
      region: us-west-1
      expires: ''
      makeUploadsPublic: ''
      storageClass: ''
      cfDistributionId: ''
      cfPrefix: ''
      autoFocalPoint: ''
    sortOrder: 1

composer.json

{
  "require": {
    "craftcms/aws-s3": "1.2.3",
    "craftcms/cms": "3.1.30",
    "craftcms/redactor": "2.3.3.2",
    "craftconditions/conditions": "1.0.3",
    "vlucas/phpdotenv": "^2.4.0"
  },
  "autoload": {
    "psr-4": {
      "modules\\": "modules/"
    }
  },
  "config": {
    "sort-packages": true,
    "optimize-autoloader": true,
    "platform": {
      "php": "7.0"
    }
  },
  "scripts": {
    "post-root-package-install": [
      "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
    ]
  }
}

@shantamg
Copy link
Author

I just thought that would help to have the full situation (in case you see anything funny), but the simple way to say it is that the section has:

  • A text field
  • A redactor field
  • An assets field
  • A lightswitch field

@michalbulla
Copy link

michalbulla commented Jun 20, 2019

I have the same Issue. I tried to use Lightswitch and Dropdown fields in a section, but without success.

@michalbulla
Copy link

Any news on this? I installed this plugin and I hope to get it working.

@michalbulla
Copy link

It seems like nobody cares, so I'm going to uninstall this plugin :(

@shantamg
Copy link
Author

Yeah, I had high hopes for this, but it does seem like it's not actively being developed. 😞

@xaddict
Copy link

xaddict commented Jul 17, 2019

The plugin seems to not find any fields. It seems to be a very bad port of the original Craft 2 plugin.

@xaddict
Copy link

xaddict commented Jul 17, 2019

@shantamg @michalbulla Found the problem inside of conditions-atest3dc3r.js.
There's a lot of "look at my skillzzzz" code in there which made it annoying to find the actual problem.
It has to do with the this.data object that has wrong names in there.

Replace the complete file (vendor/craftconditions/conditions/src/resources/javascripts/conditions-atest3dc3r.js) with this attachment and everything should work (remove the .txt from the filename).
conditions-atest3dc3r.js.txt

@michalbulla
Copy link

michalbulla commented Jul 30, 2019

@xaddict

Thanks a lot!!

@xaddict
Copy link

xaddict commented Aug 5, 2019

@michalbulla Keep in mind that this only fixes the plugin as far as I can see. It is probably still full of bugs. For example, it doesn't seem to work on creation of a new entry but only after saving.

enmielado added a commit to enmielado/craft-conditions that referenced this issue Feb 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants