Code Monkey home page Code Monkey logo

entriessubset's People

Contributors

boboldehampsink avatar dependabot[bot] avatar nfourtythree avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

entriessubset's Issues

Craft 5

Hi,

Will this be updated to Craft CMS 5?

How to Completely Remove

We're no longer using our licensed version of EntriesSubset on our Craft 3 site and I need to completely remove it.

I used Settings > Plugins > EntriesSubset > Uninstall and now only see Install as an option in the dropdown. The plugin's status is Missing. I've run $ composer remove and have confirmed that the plugin files are no longer in /vendor. The plugin is not mentioned anywhere in composer.json or composer.lock. It also doesn't appear in the craft_plugins table.

When I load Settings > Plugins, the installed plugins display immediately and then EntriesSubset appears after a short pause. I am not logged into our Craft ID account.

Don't change Project config during migration

Please don't change the project config in a migration without security checks, this will throw errors since not everyone allows admin changes in production environment.

That means releasing your plugin in production mode with the correct usage of the project config always throws exceptions for me.

Exception: Changes to the project config are not possible while in read-only mode. (/var/www/thaff/htdocs/page/vendor/craftcms/cms/src/services/ProjectConfig.php:354)

Please read this
https://docs.craftcms.com/v3/extend/project-config.html#project-config-migrations

Field breaks on Craft upgrade

Recently updated a Craft install to the latest version, 3.4.18 and after the update was complete Entries Subset was "broken"

Through investigating the following showed up on the fields listing for each Entries Subset field:
nfourtythree\entriessubset\fields\EntriesSubsetField

When looking at the entries with those field(s) the following was listed:
Unable to find component class 'nfourtythree\entriessubset\fields\EntriesSubsetField'.

A similar warning was on the front-end:
Class 'nfourtythree\entriessubset\fields\EntriesSubsetField' not found

A possible fix was renaming the file under vendor/nfourtythree/entriessubset/src/fields from EntriesSubset.php to EntriesSubsetField.php. Doing that everything went back to working order.

Craft 3.4.18
Entries Subset 1.2.2

Feature Request: Limit to levels in Structures

I think a cool feature (that seems in scope for the plugin) would be to limit entry selections to a specific level in a Structure.

Sometimes we use Structures for Landing Page > Item Listings/Categories > Individual Items, and being able to limit only to the Listing/Category entries would frequently be useful. Currently we just include directions to only pick from a certain level, but protecting content managers from themselves is good in these cases.

Fix Composer 2 compatibility

When installing this plugin with Composer 1, the following deprecation notice is output:

Deprecation Notice: Class nfourtythree\entriessubset\fields\EntriesSubsetField located in ./vendor/nfourtythree/entriessubset/src/fields/EntriesSubset.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0.

Composer 2 was released on October 24, and is now the default version that will be installed, so it’s critical that this gets resolved ASAP, or people will start getting Class not found errors.

To fix, run the following command:

> git mv src/fields/EntriesSubset.php src/fields/EntriesSubsetField.php

Then commit your change and tag a new release.

(Note that you must use the git mv command, as Git tends to not notice case-sensitive file renames otherwise.)

Craft 4?

Wondering if this plugin will get updated for Craft 4?

Installation via Composer failed because I'm doing the false way

When invoking a composer require … as stated in the README file I get an error message.

[InvalidArgumentException]
Could not find a matching version of package nfourtythree/craft3-entriessubset. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (stable).

I also couldn't find the lib on http://packagist.org/…

I then realized that there is no way of installing it manually. It's a plugin to be installed via Craft's new plugin store.

Please, change the README file's content. It currently leads people to waste time on (not) installing things they actually can't install the documented way.

Thanks. :)

Issue when deleting entry types

When you create a new field and delete an entryType selected in this field afterwards it will throw an error. Would you mind to check if the fetched entry type is not null please?

https://github.com/nfourtythree/craft3-entriessubset/blob/master/src/fields/EntriesSubset.php#L121

protected function inputTemplateVariables( $value = null, ElementInterface $element = null ): array
{
  $vars = parent::inputTemplateVariables( $value, $element );
  
  $settings = $this->getSettings();
  
  
  if ( isset( $settings[ 'entryTypes' ] ) ) {
	$entryTypes = $settings[ 'entryTypes' ];
	
	if ($entryTypes and is_array( $entryTypes ) and !empty( $entryTypes ) ) {
	  foreach( $entryTypes as $typeId ) {
		if ( is_numeric( $typeId ) ) {
		  $entryType = Craft::$app->sections->getEntryTypeById( $typeId );
		  if($entryType !== null){     //  <--- just check if it's not null so $entryType->handle won't throw an exception  
			$vars[ 'criteria' ][ 'type' ][] = $entryType->handle;
		  }
		}
	  }
	}
  }

  return $vars;
}

Otherwise we would have to include your plugin to our git in order to keep this change into all our projects.

Thank you very much

Migration error on update 1.2.1 > 1.2.2

I'm getting this migration error on plugin update. Running Craft 3.4.23.

yii\base\ErrorException: Invalid argument supplied for foreach()

Migration: nfourtythree\entriessubset\migrations\m190906_102859_entry_type_id_to_uid

Output:

Exception: Invalid argument supplied for foreach() (/Users/stevehurst/Sites/kalypso.craft.local/vendor/nfourtythree/entriessubset/src/migrations/m190906_102859_entry_type_id_to_uid.php:60)
#0 /Users/stevehurst/Sites/kalypso.craft.local/vendor/craftcms/cms/src/web/ErrorHandler.php(74): yii\base\ErrorHandler->handleError(2, 'Invalid argumen...', '/Users/stevehur...', 60)
#1 /Users/stevehurst/Sites/kalypso.craft.local/vendor/nfourtythree/entriessubset/src/migrations/m190906_102859_entry_type_id_to_uid.php(60): craft\web\ErrorHandler->handleError(2, 'Invalid argumen...', '/Users/stevehur...', 60, Array)
#2 /Users/stevehurst/Sites/kalypso.craft.local/vendor/craftcms/cms/src/db/Migration.php(52): nfourtythree\entriessubset\migrations\m190906_102859_entry_type_id_to_uid->safeUp()
#3 /Users/stevehurst/Sites/kalypso.craft.local/vendor/craftcms/cms/src/db/MigrationManager.php(233): craft\db\Migration->up(true)
#4 /Users/stevehurst/Sites/kalypso.craft.local/vendor/craftcms/cms/src/db/MigrationManager.php(153): craft\db\MigrationManager->migrateUp(Object(nfourtythree\entriessubset\migrations\m190906_102859_entry_type_id_to_uid))
#5 /Users/stevehurst/Sites/kalypso.craft.local/vendor/craftcms/cms/src/services/Updates.php(233): craft\db\MigrationManager->up()
#6 /Users/stevehurst/Sites/kalypso.craft.local/vendor/craftcms/cms/src/controllers/BaseUpdaterController.php(510): craft\services\Updates->runMigrations(Array)
#7 /Users/stevehurst/Sites/kalypso.craft.local/vendor/craftcms/cms/src/controllers/UpdaterController.php(203): craft\controllers\BaseUpdaterController->runMigrations(Array, 'restore-db')
#8 [internal function]: craft\controllers\UpdaterController->actionMigrate()
#9 /Users/stevehurst/Sites/kalypso.craft.local/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#10 /Users/stevehurst/Sites/kalypso.craft.local/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#11 /Users/stevehurst/Sites/kalypso.craft.local/vendor/craftcms/cms/src/web/Controller.php(178): yii\base\Controller->runAction('migrate', Array)
#12 /Users/stevehurst/Sites/kalypso.craft.local/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('migrate', Array)
#13 /Users/stevehurst/Sites/kalypso.craft.local/vendor/craftcms/cms/src/web/Application.php(291): yii\base\Module->runAction('updater/migrate', Array)
#14 /Users/stevehurst/Sites/kalypso.craft.local/vendor/craftcms/cms/src/web/Application.php(646): craft\web\Application->runAction('updater/migrate')
#15 /Users/stevehurst/Sites/kalypso.craft.local/vendor/craftcms/cms/src/web/Application.php(243): craft\web\Application->_processUpdateLogic(Object(craft\web\Request))
#16 /Users/stevehurst/Sites/kalypso.craft.local/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#17 /Users/stevehurst/Sites/kalypso.craft.local/public/index.php(21): yii\base\Application->run()
#18 {main}

Upgrade from Craft 2?

I'm updating a site from Craft 2 to 3. The old site used EntriesSubset, and I have installed the Craft 3 version on the new site. However, I'm still seeing notices saying Unable to find component class 'EntriesSubset'.

Is it possible to retrieve the Craft 2 entry data and have the Craft 3 version of EntriesSubset read it?

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.