Code Monkey home page Code Monkey logo

craft-fieldlabels's People

Contributors

aaronbushnell avatar benjamminf avatar engram-design avatar iainsaxon avatar leevigraham avatar pvldigital avatar swey avatar ttempleton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

craft-fieldlabels's Issues

Project Config issue

Description

I've been using Project Config the past few days to keep my local and remote setups in sync. I just installed Field Labels and deployed to fortrabbit and got an error after the sync installed the plugin. See screenshot:

image

Running it again and I get a done message, but in the admin I'm not seeing my relabelled fields.

Steps to reproduce

  1. Install plugin and relabel field instructions.
  2. Deploy to remote.
  3. Run project-config/sync

Other information

  • Field Labels version: 1.0.2
  • Craft CMS version: 3.1.19

Relabel instructions are being output twice

Hey there! First of all thanks for this super handy plugin. Saves me from creating a bunch of one-off fields.

As of yesterday, I ran into an issue where Relabel instructions are being outputted twice. Not sure what's causing it to happen.

screen shot 2017-11-15 at 9 32 18 am

Using:

  • Craft CMS 2.6.2997
  • PHP 7

The data seems to have a single instance of the instruction text.
screenshot 2017-11-15 09 44 54

If you need any additional information, I'll be happy to provide it.

Installation failure when commerce not installed but in vendor

I have commerce in my vendor folder but it is not installed within craft, so when i try and install fieldlabels i get the error:

Call to a member function getProductTypes() on null

line 222: $layouts['commerceProductType'] = $this->_mapCommerceLayouts($commerce->getProductTypes()->getAllProductTypes());

in Plugin.php

Relabelling for user fields

Because the field layout is fixed for users, relabelling will work differently. Need to find a way to implement relabelling for user fields.

Migration failure on update: Unknown column 'types.maxSiblingBlocks' in 'field list'

Description

This issue looks very similar to one in the Neo repository spicywebau/craft-neo#382 but slightly different. I just made the big update on our site from Craft CMS 3.4.9 to 3.5.4. Along with the core CMS updates, I'm also updating Neo from 2.6.4 to 2.8.4 and FieldLabels from 1.1.9 to 1.3.1.

Steps to reproduce

I haven't reproduced on a fresh install. But here's the gist:

  1. Start with Craft 3.4.9, Neo 2.6.4, FieldLabels 1.1.9
  2. Perform upgrade to latest versions (Craft 3.5.4, Neo 2.8.4, FieldLabels 1.3.1)
  3. Upgrade fails with this error message:

Database Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'types.maxSiblingBlocks' in 'field list'
The SQL being executed was: SELECT types.fieldLayoutId, types.name, types.handle, types.maxBlocks, types.maxSiblingBlocks, types.maxChildBlocks, types.childBlocks, types.topLevel, types.sortOrder, types.uid, fields.uid AS field
FROM neoblocktypes types
INNER JOIN fields fields ON types.fieldId = fields.id

Migration: spicyweb\fieldlabels\migrations\m200812_104254_craft_3_5_field_layout_transition_part_2

Output:

Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'types.maxSiblingBlocks' in 'field list'
The SQL being executed was: SELECT types.fieldLayoutId, types.name, types.handle, types.maxBlocks, types.maxSiblingBlocks, types.maxChildBlocks, types.childBlocks, types.topLevel, types.sortOrder, types.uid, fields.uid AS field
FROM neoblocktypes types
INNER JOIN fields fields ON types.fieldId = fields.id (/site/src/vendor/yiisoft/yii2/db/Schema.php:677)
#0 /site/src/vendor/yiisoft/yii2/db/Command.php(1298): yii\db\Schema->convertException(Object(PDOException), 'SELECT types....')
#1 /site/src/vendor/yiisoft/yii2/db/Command.php(1159): yii\db\Command->internalExecute('SELECT types....')
#2 /site/src/vendor/yiisoft/yii2/db/Command.php(401): yii\db\Command->queryInternal('fetchAll', NULL)
#3 /site/src/vendor/yiisoft/yii2/db/Query.php(248): yii\db\Command->queryAll()
#4 /site/src/vendor/craftcms/cms/src/db/Query.php(152): yii\db\Query->all(NULL)
#5 /site/src/vendor/spicyweb/craft-neo/src/Plugin.php(148): craft\db\Query->all()
#6 [internal function]: benf\neo\Plugin->benf\neo{closure}(Object(craft\events\RebuildConfigEvent))
#7 /site/src/vendor/yiisoft/yii2/base/Event.php(312): call_user_func(Object(Closure), Object(craft\events\RebuildConfigEvent))
#8 /site/src/vendor/yiisoft/yii2/base/Component.php(636): yii\base\Event::trigger('craft\services\...', 'rebuild', Object(craft\events\RebuildConfigEvent))
#9 /site/src/vendor/craftcms/cms/src/services/ProjectConfig.php(1149): yii\base\Component->trigger('rebuild', Object(craft\events\RebuildConfigEvent))
#10 /site/src/vendor/spicyweb/craft-fieldlabels/src/migrations/m200812_104254_craft_3_5_field_layout_transition_part_2.php(86): craft\services\ProjectConfig->rebuild()
#11 /site/src/vendor/craftcms/cms/src/db/Migration.php(52): spicyweb\fieldlabels\migrations\m200812_104254_craft_3_5_field_layout_transition_part_2->safeUp()
#12 /site/src/vendor/craftcms/cms/src/db/MigrationManager.php(232): craft\db\Migration->up(true)
#13 /site/src/vendor/craftcms/cms/src/db/MigrationManager.php(148): craft\db\MigrationManager->migrateUp(Object(spicyweb\fieldlabels\migrations\m200812_104254_craft_3_5_field_layout_transition_part_2))
#14 /site/src/vendor/craftcms/cms/src/services/Updates.php(227): craft\db\MigrationManager->up()
#15 /site/src/vendor/craftcms/cms/src/controllers/BaseUpdaterController.php(509): craft\services\Updates->runMigrations(Array)
#16 /site/src/vendor/craftcms/cms/src/controllers/UpdaterController.php(203): craft\controllers\BaseUpdaterController->runMigrations(Array, 'restore-db')
#17 [internal function]: craft\controllers\UpdaterController->actionMigrate()
#18 /site/src/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#19 /site/src/vendor/yiisoft/yii2/base/Controller.php(180): yii\base\InlineAction->runWithParams(Array)
#20 /site/src/vendor/craftcms/cms/src/web/Controller.php(181): yii\base\Controller->runAction('migrate', Array)
#21 /site/src/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('migrate', Array)
#22 /site/src/vendor/craftcms/cms/src/web/Application.php(294): yii\base\Module->runAction('updater/migrate', Array)
#23 /site/src/vendor/craftcms/cms/src/web/Application.php(684): craft\web\Application->runAction('updater/migrate')
#24 /site/src/vendor/craftcms/cms/src/web/Application.php(247): craft\web\Application->_processUpdateLogic(Object(craft\web\Request))
#25 /site/src/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#26 /site/src/public/index.php(21): yii\base\Application->run()
#27 {main}

Other information

  • Neo version: See above
  • Craft version: See above
  • (if multi-site) What is the affected Neo field's propagation method: Not multisite
  • Is eager-loading used? N/A

256-character limit for instructions column too small

Description

I'm using Entry Instructions 1.0.4 to share read-only instructions with editors on entry edit screens. Some of the instructions are longer than 256 characters.

When I use Field Labels to relabel this field type, and I enter more than 256 characters under Instructions, I get this error:

SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'instructions' at row 1

As a workaround for now, I can write shorter instructions or create individual fields, but it would be great to be able to use the normal Field Labels behavior to customize a single field for different contexts!

Steps to reproduce

  1. Create an Entry Instructions field (character limit doesn't cause a problem here).
  2. Add the Entry Instructions field to a section.
  3. Relabel the Entry Instructions field with more than 256 characters under Instructions.

Other information

  • Field Labels version: 1.0.7
  • Craft CMS version: Pro 3.1.25

getIsGuest() conditional returns true when signed into control panel

Description

I think this is likely a race condition, but I'm not seeing the Relabel dropdowns or instructions when I'm signed in as a super admin. It looked like the JS wasn't even being included so I dug into this a bit deeper.

The conditional in Plugin.php for !$userSession->getIsGuest() returned false for me (indicating that I'm a guest) even though I'm signed in.

If I change this:

$this->_includeResources();
$this->_bindEvent();

to this:

Event::on(
    UrlManager::class,
    UrlManager::EVENT_REGISTER_CP_URL_RULES,
    function (RegisterUrlRulesEvent $event) {
        $this->_includeResources();
        $this->_bindEvent();
    }
);

And include the correct modules:

use craft\web\UrlManager;
use craft\events\RegisterUrlRulesEvent;

Everything works as expected.

I'm thinking Craft might be indicating that I'm a guest at some point in execution and then determines I'm signed in later?

I have devMode enabled so maybe this is influencing that path, too.

Other information

  • Field Labels version: 1.0.0
  • Craft CMS version: Craft Pro 3.1.19

Cannot read property 'prototype' of undefined

Description

A javascript exception is thrown on the admin dashboard page when you don't have the Quick Post widget enabled.

The error is located at line 22 in src/resources/js/Widgets.js
var QuickPostWidget_save = Craft.QuickPostWidget.prototype.save;

Steps to reproduce

  1. Visit the admin dashboard
  2. Make sure you don't have the Quick Post widget activated on the page
  3. Open devtools console, see exception

Other information

  • Field Labels version: 1.2.2
  • Craft CMS version: 3.4.28.1
  • Craft Commerce version (if the issue affects Commerce):
  • Browser and version (if the issue affects a specific browser):

[bug] Uncaught type errors and can't remove relabels

edited as I figure out more

I'm getting JavaScript console errors referencing line 119 and line 226 of FieldLabels.js:

  • Uncaught TypeError: Cannot read property 'handle' of undefined
  • Uncaught TypeError: Cannot read property 'addItems' of undefined'.

I am also finding that I can't remove existing relabels from fields in sections. I can change them, but just deleting them and saving doesn't work - the old data comes back. Not sure if this is related, but I'm seeing the errors for the same sections where this is happening.

System

  • Craft Pro 3.1.26
  • PHP 7.2.17
  • MySQL 5.5.5
  • Field Labels 1.1.0

Syntax error

Parse error: syntax error, unexpected '[' in RelabelPlugin.php on line 192 on MediaTemple Grid hosting (I know... I know). Doesn't happen on my local with MAMP. Maybe an outdated PHP version (5.3.29)?

Console Error when creating new entry from HUD

Description

I'm unable to create a new entry from the HUD when using an Entries field.

image

This was the console error I got:

image

Steps to reproduce

  1. Edit an entry using an Entries field.
  2. Click on the Entries field to fire the HUD view of the entries that can be added.
  3. Click on the +New Entry button in the HUD, but nothing happens.

Other information

  • Field Labels version: 1.0.3
  • Craft CMS version: 3.1.20.1

Replace error message default value with field label's value

First off, thank you so much for this plugin. It's amazing!

Description

When a required field that has been relabeled is not filled out and a user attempts to save the element, the default field name shows up as the error message. In the example below I have a field called "Plaintext" that I use over and over again for simple input, but use Fieldlabels to make it more appropriate for the user. When attempting to save the entry with the field empty, I see the default "Plaintext cannot be blank" instead of "Subject cannot be blank".

plaintext cannot be blank

Steps to reproduce

  1. Create a plaintext field and make it required (i'm sure this works with all required fields without default values as well)
  2. Attempt to save the element while the field is empty
  3. Observe the default error message

Other information

  • Field Labels version: 1.0.7
  • Craft CMS version: 3.1.25

EDIT: Super sorry, I should have checked the closed issues first. It seems like this was reported back in 2017 with #11. Not sure if it's 100% the same or not, but if it is feel free to close.

Craft 3.5.4 Migration issue

Description

When trying to update to Craft 3.5.4 and Field Labels 1.3.1 we are getting a migration error:

Exception: Site is missing its group ID (/Users/michaelvandorth/Sites/FTI/vendor/craftcms/cms/src/models/Site.php:211)
#0 /Users/michaelvandorth/Sites/FTI/vendor/craftcms/cms/src/models/Site.php(252): craft\models\Site->getGroup()
#1 /Users/michaelvandorth/Sites/FTI/vendor/craftcms/cms/src/services/ProjectConfig.php(1764): craft\models\Site->getConfig()
#2 /Users/michaelvandorth/Sites/FTI/vendor/craftcms/cms/src/services/ProjectConfig.php(1130): craft\services\ProjectConfig->_getSiteData()
#3 /Users/michaelvandorth/Sites/FTI/vendor/spicyweb/craft-fieldlabels/src/migrations/m200812_104254_craft_3_5_field_layout_transition_part_2.php(86): craft\services\ProjectConfig->rebuild()
#4 /Users/michaelvandorth/Sites/FTI/vendor/craftcms/cms/src/db/Migration.php(52): spicyweb\fieldlabels\migrations\m200812_104254_craft_3_5_field_layout_transition_part_2->safeUp()
#5 /Users/michaelvandorth/Sites/FTI/vendor/craftcms/cms/src/db/MigrationManager.php(232): craft\db\Migration->up(true)
#6 /Users/michaelvandorth/Sites/FTI/vendor/craftcms/cms/src/db/MigrationManager.php(148): craft\db\MigrationManager->migrateUp(Object(spicyweb\fieldlabels\migrations\m200812_104254_craft_3_5_field_layout_transition_part_2))
#7 /Users/michaelvandorth/Sites/FTI/vendor/craftcms/cms/src/services/Updates.php(227): craft\db\MigrationManager->up()
#8 /Users/michaelvandorth/Sites/FTI/vendor/craftcms/cms/src/console/controllers/MigrateController.php(328): craft\services\Updates->runMigrations(Array)
#9 [internal function]: craft\console\controllers\MigrateController->actionAll()
#10 /Users/michaelvandorth/Sites/FTI/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#11 /Users/michaelvandorth/Sites/FTI/vendor/yiisoft/yii2/base/Controller.php(180): yii\base\InlineAction->runWithParams(Array)
#12 /Users/michaelvandorth/Sites/FTI/vendor/yiisoft/yii2/console/Controller.php(181): yii\base\Controller->runAction('all', Array)
#13 /Users/michaelvandorth/Sites/FTI/vendor/yiisoft/yii2/base/Module.php(528): yii\console\Controller->runAction('all', Array)
#14 /Users/michaelvandorth/Sites/FTI/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('migrate/all', Array)
#15 /Users/michaelvandorth/Sites/FTI/vendor/craftcms/cms/src/console/Application.php(87): yii\console\Application->runAction('migrate/all', Array)
#16 /Users/michaelvandorth/Sites/FTI/vendor/yiisoft/yii2/console/Application.php(147): craft\console\Application->runAction('migrate/all', Array)
#17 /Users/michaelvandorth/Sites/FTI/vendor/yiisoft/yii2/base/Application.php(386): yii\console\Application->handleRequest(Object(craft\console\Request))
#18 /Users/michaelvandorth/Sites/FTI/craft(22): yii\base\Application->run()
#19 {main}
Exception 'craft\errors\MigrateException' with message 'An error occurred while migrating Field Labels.'

in /Users/michaelvandorth/Sites/FTI/vendor/craftcms/cms/src/services/Updates.php:235

Stack trace:
#0 /Users/michaelvandorth/Sites/FTI/vendor/craftcms/cms/src/console/controllers/MigrateController.php(328): craft\services\Updates->runMigrations(Array)
#1 [internal function]: craft\console\controllers\MigrateController->actionAll()
#2 /Users/michaelvandorth/Sites/FTI/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#3 /Users/michaelvandorth/Sites/FTI/vendor/yiisoft/yii2/base/Controller.php(180): yii\base\InlineAction->runWithParams(Array)
#4 /Users/michaelvandorth/Sites/FTI/vendor/yiisoft/yii2/console/Controller.php(181): yii\base\Controller->runAction('all', Array)
#5 /Users/michaelvandorth/Sites/FTI/vendor/yiisoft/yii2/base/Module.php(528): yii\console\Controller->runAction('all', Array)
#6 /Users/michaelvandorth/Sites/FTI/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('migrate/all', Array)
#7 /Users/michaelvandorth/Sites/FTI/vendor/craftcms/cms/src/console/Application.php(87): yii\console\Application->runAction('migrate/all', Array)
#8 /Users/michaelvandorth/Sites/FTI/vendor/yiisoft/yii2/console/Application.php(147): craft\console\Application->runAction('migrate/all', Array)
#9 /Users/michaelvandorth/Sites/FTI/vendor/yiisoft/yii2/base/Application.php(386): yii\console\Application->handleRequest(Object(craft\console\Request))
#10 /Users/michaelvandorth/Sites/FTI/craft(22): yii\base\Application->run()
#11 {main}

Steps to reproduce

  1. Update Craft from version 3.4.10.1 to 3.5.4 and Field Labels from version 1.2.4 to 1.3.1
  2. run ./craft migrate/all Craft Command
  3. Migration error above appears

Other information

  • Field Labels version: 1.2.4 -> 1.3.1
  • Craft CMS version: 3.4.10.1 -> 3.5.4
  • Database driver: PostgreSQL 10.8

Unable to save changes to Neo field with relabels

Description

Occasionally, when I make some changes to a Neo field with lots of blocks and several relabels, I get this error and I'm unable to save the changes to the field:

Argument 2 passed to craft\helpers\Db::idByUid() must be of the type string, null given, called in /var/app/current/vendor/spicyweb/craft-fieldlabels/src/Service.php on line 227

full stack trace

It doesn't seem to be triggered by the specific Neo block or field layout I was changing. The stack trace usually shows another field label. I was able to fix this once by updating Neo, but it feels like that was more of a "hit it with a hammer" fix than an actual fix. Since then, the problem has arisen again.

Steps to reproduce

  1. Edit large Neo field.
  2. change some field labels and/or instructions.
  3. click save.

Other information

  • Field Labels version: 1.1.10
  • Neo version: 2.7.10
  • Craft CMS version: 3.4.9

Unknown column 'hideName' in 'field list' after updating

Description

After updating my plugin from 1.1.1 to 1.1.2 I now see this error:

SQLSTATE[42S22]: Column not found: 1054 Unknown column hideName in field list The SQL being executed was: SELECT id, fieldId, fieldLayoutId, name, instructions, hideName, hideInstructions, uid FROM craft_fieldlabels ORDER BY id DESC

The database table doesn't get updated with the new fields.

If I manually add the fields to the database table, it will continue with the update but I eventually get another error:
The SQL being executed was: ALTER TABLE craft_fieldlabels ADD hideName tinyint(1) NOT NULL DEFAULT FALSE AFTER instructions Migration: spicyweb\fieldlabels\migrations\m190517_093540_hide_field_headings

Other information

  • Field Labels version: 1.1.2
  • Craft CMS version: 3.1.29

PostgreSQL error with hideName column

Description

Site is inaccessible with database exception error.

SQLSTATE[42703]: Undefined column: 7 ERROR: column "hideName" does not exist
LINE 1: ...ieldId", "fieldLayoutId", "name", "instructions", "hideName"...
^
The SQL being executed was: SELECT "id", "fieldId", "fieldLayoutId", "name", "instructions", "hideName", "hideInstructions", "uid"
FROM "fieldlabels"
ORDER BY "id" DESC

Caused by: PDOException
SQLSTATE[42703]: Undefined column: 7 ERROR: column "hideName" does not exist
LINE 1: ...ieldId", "fieldLayoutId", "name", "instructions", "hideName"...

Steps to reproduce

  1. Update Field Labels plugin locally.
  2. Push to staging site.
  3. Get these errors.

Other information

  • Field Labels version: 1.1.2
  • Craft CMS version: Craft Pro 3.1.29
  • Database driver: PostgreSQL 10.8

Relabelled fields in widgets

The re-labelled fields in 'quick post' widgets on the cp dashboard page keep their original settings and aren't re-labelled. Not sure if this is a core issue as the quick-post widgets is built-in right so doubt you can hijack the fields there. Flagging it up anyway.
Cheers

Deleting a relabeled field does not remove reference in project.yaml, making it crash on craft setup.

Description

If you delete a field that has been relabeled before "reverting" back to the original label, it makes the project.yaml crash on Craft setup.

Steps to reproduce

  1. Relabel a field
  2. Delete the field
  3. Relabel references are not removed from project.yaml so it crash when you try to install the project.
fieldlabels.b3f5addb-352a-441d-8937-6d3e2fb37860
fieldlabels.a2b4777f-3cc0-4d14-8fe8-cd0bdf1d6416
fieldlabels.2dd65639-6087-445c-969a-3271e0d6eb04
fieldlabels.e559ceac-9995-4528-a710-91730eb2e875
fieldlabels.f87017fb-c3da-4e7e-a0e9-41a57239432c
fieldlabels.fc3a316d-cd4c-4f4b-ab12-102b63e9e38d
fieldlabels.d9768070-694f-41e6-878c-759317d63998
fieldlabels.435da481-2d29-4e40-8754-709131aa7e04
fieldlabels.8b06c658-dfdb-4b1e-a091-a90e9451ed10
fieldlabels.8a8de623-a854-476b-b9a8-8686b07d0b85
fieldlabels.642a0272-168f-4dd3-abb9-3780e6fdd804 (/home/username/Projects/craft-wet/vendor/craftcms/cms/src/services/ProjectConfig.php:970)
#0 /home/username/Projects/craft-wet/vendor/craftcms/cms/src/services/ProjectConfig.php(441): craft\services\ProjectConfig->_applyChanges(Array)
#1 /home/username/Projects/craft-wet/vendor/craftcms/cms/src/migrations/Install.php(1036): craft\services\ProjectConfig->applyYamlChanges()
#2 /home/username/Projects/craft-wet/vendor/craftcms/cms/src/migrations/Install.php(73): craft\migrations\Install->insertDefaultData()
#3 /home/username/Projects/craft-wet/vendor/craftcms/cms/src/db/Migration.php(58): craft\migrations\Install->safeUp()
#4 /home/username/Projects/craft-wet/vendor/craftcms/cms/src/db/MigrationManager.php(239): craft\db\Migration->up(true)
#5 /home/username/Projects/craft-wet/vendor/craftcms/cms/src/console/controllers/InstallController.php(161): craft\db\MigrationManager->migrateUp(Object(craft\migrations\Install))
#6 [internal function]: craft\console\controllers\InstallController->actionCraft()
#7 /home/username/Projects/craft-wet/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#8 /home/username/Projects/craft-wet/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#9 /home/username/Projects/craft-wet/vendor/yiisoft/yii2/console/Controller.php(148): yii\base\Controller->runAction('', Array)
#10 /home/username/Projects/craft-wet/vendor/craftcms/cms/src/console/Controller.php(199): yii\console\Controller->runAction('', Array)
#11 /home/username/Projects/craft-wet/vendor/yiisoft/yii2/base/Module.php(528): craft\console\Controller->runAction('', Array)
#12 /home/username/Projects/craft-wet/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('install', Array)
#13 /home/username/Projects/craft-wet/vendor/craftcms/cms/src/console/Application.php(93): yii\console\Application->runAction('install', Array)
#14 /home/username/Projects/craft-wet/vendor/craftcms/cms/src/console/controllers/SetupController.php(124): craft\console\Application->runAction('install')
#15 [internal function]: craft\console\controllers\SetupController->actionIndex()
#16 /home/username/Projects/craft-wet/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#17 /home/username/Projects/craft-wet/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#18 /home/username/Projects/craft-wet/vendor/yiisoft/yii2/console/Controller.php(148): yii\base\Controller->runAction('', Array)
#19 /home/username/Projects/craft-wet/vendor/craftcms/cms/src/console/Controller.php(199): yii\console\Controller->runAction('', Array)
#20 /home/username/Projects/craft-wet/vendor/yiisoft/yii2/base/Module.php(528): craft\console\Controller->runAction('', Array)
#21 /home/username/Projects/craft-wet/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('setup', Array)
#22 /home/username/Projects/craft-wet/vendor/craftcms/cms/src/console/Application.php(93): yii\console\Application->runAction('setup', Array)
#23 /home/username/Projects/craft-wet/vendor/yiisoft/yii2/console/Application.php(147): craft\console\Application->runAction('setup', Array)
#24 /home/username/Projects/craft-wet/vendor/yiisoft/yii2/base/Application.php(386): yii\console\Application->handleRequest(Object(craft\console\Request))
#25 /home/username/Projects/craft-wet/craft(22): yii\base\Application->run()
#26 {main}
Exception 'craft\errors\MigrationException' with message 'An error occurred while executing the "craft\migrations\Install migration: The following config paths could not be processed successfully:
fieldlabels.b3f5addb-352a-441d-8937-6d3e2fb37860
fieldlabels.a2b4777f-3cc0-4d14-8fe8-cd0bdf1d6416
fieldlabels.2dd65639-6087-445c-969a-3271e0d6eb04
fieldlabels.e559ceac-9995-4528-a710-91730eb2e875
fieldlabels.f87017fb-c3da-4e7e-a0e9-41a57239432c
fieldlabels.fc3a316d-cd4c-4f4b-ab12-102b63e9e38d
fieldlabels.d9768070-694f-41e6-878c-759317d63998
fieldlabels.435da481-2d29-4e40-8754-709131aa7e04
fieldlabels.8b06c658-dfdb-4b1e-a091-a90e9451ed10
fieldlabels.8a8de623-a854-476b-b9a8-8686b07d0b85
fieldlabels.642a0272-168f-4dd3-abb9-3780e6fdd804'
in /home/username/Projects/craft-wet/vendor/craftcms/cms/src/db/MigrationManager.php:256
Stack trace:
#0 /home/username/Projects/craft-wet/vendor/craftcms/cms/src/console/controllers/InstallController.php(161): craft\db\MigrationManager->migrateUp(Object(craft\migrations\Install))
#1 [internal function]: craft\console\controllers\InstallController->actionCraft()
#2 /home/username/Projects/craft-wet/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#3 /home/username/Projects/craft-wet/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#4 /home/username/Projects/craft-wet/vendor/yiisoft/yii2/console/Controller.php(148): yii\base\Controller->runAction('', Array)
#5 /home/username/Projects/craft-wet/vendor/craftcms/cms/src/console/Controller.php(199): yii\console\Controller->runAction('', Array)
#6 /home/username/Projects/craft-wet/vendor/yiisoft/yii2/base/Module.php(528): craft\console\Controller->runAction('', Array)
#7 /home/username/Projects/craft-wet/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('install', Array)
#8 /home/username/Projects/craft-wet/vendor/craftcms/cms/src/console/Application.php(93): yii\console\Application->runAction('install', Array)
#9 /home/username/Projects/craft-wet/vendor/craftcms/cms/src/console/controllers/SetupController.php(124): craft\console\Application->runAction('install')
#10 [internal function]: craft\console\controllers\SetupController->actionIndex()
#11 /home/username/Projects/craft-wet/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#12 /home/username/Projects/craft-wet/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#13 /home/username/Projects/craft-wet/vendor/yiisoft/yii2/console/Controller.php(148): yii\base\Controller->runAction('', Array)
#14 /home/username/Projects/craft-wet/vendor/craftcms/cms/src/console/Controller.php(199): yii\console\Controller->runAction('', Array)
#15 /home/username/Projects/craft-wet/vendor/yiisoft/yii2/base/Module.php(528): craft\console\Controller->runAction('', Array)
#16 /home/username/Projects/craft-wet/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('setup', Array)
#17 /home/username/Projects/craft-wet/vendor/craftcms/cms/src/console/Application.php(93): yii\console\Application->runAction('setup', Array)
#18 /home/username/Projects/craft-wet/vendor/yiisoft/yii2/console/Application.php(147): craft\console\Application->runAction('setup', Array)
#19 /home/username/Projects/craft-wet/vendor/yiisoft/yii2/base/Application.php(386): yii\console\Application->handleRequest(Object(craft\console\Request))
#20 /home/username/Projects/craft-wet/craft(22): yii\base\Application->run()
#21 {main}

Other information

  • Field Labels version: 1.1.7
  • Craft CMS version: 3.3.15
  • Craft Commerce version (if the issue affects Commerce):
  • Browser and version (if the issue affects a specific browser): Chrome

Incompatible with PHP 5.3

My server environment has PHP 5.3 installed. The plugin gave me the Parse error: syntax error, unexpected '[' in .../plugins/relabel/RelabelPlugin.php on line 192 error. Could it be easily made compatible? Two Craft CMS plugins recently (CategorySources and CPFieldLinks) had the same problem, and it seems all that has been required was to change array syntax (see here).

Transition to Craft 3.5 native relabelling

The overhauled Craft 3.5 field layout designer features in-built overriding of field names and instructions. We will need to provide a transition path to Craft 3.5 field relabelling for current users of Field Labels.

Not working in 3.2.0

Description

This plugin doesn't seem to be working with the latest version of Craft 3.2.0.

Other information

  • Field Labels version: 1.1.3
  • Craft CMS version: 3.2.0

Show new label in field tab

Description

Currently, when a field is relabelled, the original field name is crossed out. This kind of makes it look like the field is disabled or deleted.
Screenshot of field tab with a renamed field.

If there are multiple relabelled fields on a tab, it may also be hard to find a specific one.

Is it possible to show the new field label, maybe in addition to the struck out original one?

Cannot revert multiple labels at once.

Description

I can't revert multiple labels. I must revert one label at the time then save the entry type. The last label isn't even reversible. When I save the entry type and go back in, the relabelling is still applied. Note: The relabelled fields are on a 4th blueprint tab.

I had to remove it one by one, and the last one wouldn't revert at all so I took it out from project.yaml manually.

Steps to reproduce

  1. Relabel multiple fields in a 3rd or 4th blueprint tab and save the entry type.
  2. Revert those labels all at once and save the entry type.
  3. Return to the entry type. All "relabels" are still applied.

Other information

  • Field Labels version: 1.1.7
  • Craft CMS version: 3.3.15
  • Craft Commerce version (if the issue affects Commerce):
  • Browser and version (if the issue affects a specific browser): Chrome latest

Craft CMS 3.1.31 Undefined Variable

Description

On updating to Craft CMS 3.1.31 and trying to save a new label we get an Undefined variable: label

This stems from:

// Trigger an `afterSaveLabel` event
        if ($this->hasEventHandlers('afterSaveLabel')) {
            $this->trigger('afterSaveLabel', new FieldLabelsEvent([
                'label'      => $label,
                'isNewLabel' => $isNew,
            ]));
        }

Starting at line 258 in /vendor/spicyweb/craft-fieldlabels/src/Service.php.

Downgrading Craft removes the error.

This is a multisite Craft setup. Not sure that's connected.

Steps to reproduce

  1. Attempt to relabel a field on an entry type
  2. Save

Other information

  • Field Labels version: 1.1.2
  • Craft CMS version: 3.1.31

Thanks!

Support site translations for relabel name and instructions

Description

I'd prefer to write everything in English. But as for my Dutch clients I always translate field labels, instructions, options in dropdowns, select lists etc. etc.
Would be great if this awesome relabel plugin also supports this by apply the same technic as Craft does.

\Craft::t('site', $label);

Other information

  • Field Labels version: 1.1.10
  • Craft CMS version: 3.4.15

Working with Neo

Hey guys, do you have a timeline when this will work with Neo?

Security issue: private admin field labels and instructions being leaked in login screen source code

I just noticed that when viewing the source code of my Craft login screen, the relabel plugin seems to be dumping all its JSON data there. Since this could potentially include private data that includes field names and instructions intended for admin users only, it would be great if this was excluded from the login screen and any other screens that are potentially accessible by non-admins.

See example here: http://ku.staging7.yump.com.au/admin/login
(will remove this link shortly)

I don't have time right now to submit a patch, but if there is someone else willing to, that would be great.

Simon.

2.6 compatibility

Hello,

This plugin could be very useful, but unfortunately it doesn't seem to work in 2.6. Do you intend to make an update soon? Thank you!

FR: Hide Field Headings

Originally logged here: craftcms/cms#4138

But for consideration if P&T decide not to implement it as it seems to me this would make a lot of sense for this particular plugin.

It would be great if individual field headings could be toggled "hidden" when using the field layout designer.

For a number of fields that provide the option for placeholder text, custom select button labels (e.g. an entries, category or assets field) or in other cases when it's implied (e.g. for a blog entry there is a single rich text field), it would be great to have the option to hide the field heading. In many cases the heading can feel redundant, repetative and unnecessarily adds to the vertical height of an entry edit page.

Multilingual

Hi benjamminf,

Great Idea. Will this work for multilingual sites as well?

Not displaying new labels/instructions

Description

I could've sworn this plugin was working for me yesterday, but today the labels aren't being relabelled. I tried resetting my code and plugins, but it didn't make a difference.

I can still set the label and instructions for the field, and it seems to save changes properly, but the old labels still show when I go to edit an entry. The field in question is Craft's built-in Plaintext field, and the entry only has Plaintext and Redactor fields.

Added list of the active plugins I have right now. I thought it might be related to mmikkel/cp-field-inspect because that adds a gear to the right of a label, but disabling and uninstalling it didn't help.

Other information

  • Field Labels version: 1.1.5
  • Craft CMS version: 3.2.9
  • Other installed and active plugins:
"angellco/spoon": "^3.3",
"barrelstrength/sprout-fields": "^3.4",
"clubstudioltd/craft-inline-svg": "^0.1",
"craftcms/aws-s3": "^1.2",
"craftcms/redactor": "^2.3",
"ether/simplemap": "^3.6",
"fruitstudios/linkit": "^1.1",
"mmikkel/cp-field-inspect": "^1.0",
"nystudio107/craft-imageoptimize": "^1.5",
"nystudio107/craft-minify": "^1.2",
"nystudio107/craft-seomatic": "^3.2",
"nystudio107/craft-templatecomments": "^1.1",
"nystudio107/craft-twigpack": "^1.1",
"spicyweb/craft-fieldlabels": "^1.1",
"spicyweb/craft-neo": "^2.4",
"studioespresso/defaulttab": "^1.3",
"supercool/tablemaker": "^2.0",
"vaersaagod/dospaces": "^1.1",
"verbb/super-table": "^2.2",

Labels are only applied on first entry type

Description

I have a section with multiple entry types. The field labels are only applied to the first entry type (lowest ID).

Steps to reproduce

  1. Create a section with two entry types with different field layouts.
  2. Override field labels in both entry types.
  3. Check entries for both types.

Other information

  • Field Labels version: 1.1.7
  • Craft CMS version: 3.3.15

Re-labels not visible on “New Entry” pages in Craft 3.4

Description

we’re not seeing any field relabels on the Create a new entry pages. Once the entry or draft is saved, the relabaled field titles and instructions kick-in as you would expect. Quite likely related to #42.

Steps to reproduce

  1. Relabel a field in a section.
  2. Create a new entry in that section.

Screenshot_2020-03-09 Create a new entry (First draft)

Screenshot_2020-03-09 A should've been relabeled - Craft Plugins Dev

Other information

  • Field Labels version: 1.1.8
  • Craft CMS version: 3.4.9
  • Browser and version (if the issue affects a specific browser): Firefox 73

Relabels get lost when reporting errors

(Originally reported by @SimonEast - spicywebau/craft-neo#73)

Steps to reproduce:

  1. Create/Edit a Neo field with multiple blocks
  2. Relabel some fields (using great relabel plugin)
  3. Do something to cause a validation error such as leave a handle blank
  4. Hit save
  5. ALL fields that were previously relabelled have now been reset to default (lost their custom labels)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.