Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Lucas DEMEA

Editing local storage

Hi,
I’m trying to use the local storage feature but I cant find a way to edit the settings once they’re loaded from local storage.

In my developemnt env I migrated the settings from the db to the local storage. I can see the settings have been migrated because if I disable the local storage filter, the default column settings apply, with no customization.

Now I want to modify the columns using the UI, and save the settings to the existing local storage files. The settings load fine from the local storage but I can’t edit them (the cog button doesn’t appear anymore).

add_filter(
			'acp/storage/repositories',
			function ( array $repositories, ListScreenRepositoryFactory $factory ) use ( $acp_base_path, $is_dev_env ) {
				$post_types = [ 'post', 'evenement', 'lieu', 'artiste', 'organisateur', 'numero', 'wp-media' ];
				foreach ( $post_types as $pt ) {
					$rules = new Rules();
					$rules->add_rule( new Rule\EqualType( $pt ) );
					$repositories[ $pt ] = $factory->create(
						$acp_base_path . "/acp-columns/${pt}",
						// is the folder writable ?
						true,
						$rules
					);
				}
				return $repositories;
			},
			10,
			2
		);
1 year, 5 months ago
Lucas DEMEA

I deactivated and reactivated the plugin, and I can now edit the settings again.

1 year, 5 months ago
Stefan van den Dungen Gronovius
Developer

I’m glad that everything works now as expected. If you run into any other issues, please let us know.

1 year, 5 months ago

You must be logged in to reply to this topic.