Hot answers tagged

3

You will need to change the version in your composer.json file to the version you want (guessing 4.3.2 if you want the last version) then run composer update on the command line.


2

Since the video button is supplied by a plugin, it should go under the plugins key rather than the buttons key. Your config would end up something like: { "buttons": ["html", "format", "bold", "italic", "lists", "link", "file"], "plugins": ["video"] }


2

Try changing it to this: "nystudio107/craft-seomatic": "^3.3.0",


2

You will need to enable it to uninstall it but you can do everything via CLI. First ./craft plugin/enable plugin-handle then ./craft plugin/uninstall plugin-handle then composer remove namespace/package-name. If you really can't enable it as above, you'd need to composer remove namespace/package-name and manually remove any references in your plugins table, ...


2

You can pass a list type handle in the query like this: {% set compare = craft.wishlist.item(entry.id, null, 'compare') %} I had to look at the source code for the craft.wishlist variable to confirm what that's doing, though! The Wishlist docs on checking if an item is in a list aren't super-clear on this, but passing the list type handle in the query will ...


2

Your only problem here is limit but would something like this work for you? {# Default tags permitted #} {% set defaultTags = "<p>" %} {# Concatenate default + custom tags #} {% set allowedTags = defaultTags ~ matrixBlock.tagList ?? null %} {# Limit - use if provided or set to unlimited using a huge number #} {% set limit = matrixBlock....


2

I've managed to get it working with great help from Brad Bell and Oli. The following code changes feedme slugs on Import. use craft\feedme\events\ElementEvent; use craft\helpers\ElementHelper; use craft\elements\Entry; Adding the following Event with the namespaces above works nicely. Event::on( Process::class, Process::...


2

The problem is that this plugin isn't PSR-4 compliant and I'm guessing you're using Composer 2. The author of hestabit/craftajaxinate needs to correct the file naming. Workarounds (dirty): a) You could try using Composer 1 b) rename craftajaxinate in vendor/hestabit/craftajaxinate/src/assetbundles/ to CraftAjaxinate


2

This is how I would go about this (in a local or dev environment): PHP First, activate PHP 7.4 and check if the site still works as it should (frontend, backend). I don't know exactly if version 3.3.4.1 works with PHP 7.4, but it's easier to switch back to an older PHP-version than reverting a Craft upgrade. Craft After you've made sure that the site still ...


2

This might not be the answer you were looking for, but I don't think you need to go to great lengths trying to achieve something that in my opinion is not necessary. While it might seem to be not "clean" to have database table columns that are not required by your application/plugin, consider that todays ICT infrastructure is powerful enough to not ...


2

You mixed in some code from the documentation resulting in a wrong variable name.. {% set pdfBlocks = entry.inhaltMatrix.all() %} {% if pdfBlocks|length %} {% for block in pdfBlocks %} {% if block.type == "pdf" %} {% if block.pdfFile %} {% set rel = block.pdfFile.one() %} ...


2

As far as I know there is no plugin that has this feature. If there is none you would have to write a custom module for that. The module would have 4 main responsibilities. get all users that are subject to get notified compose a notification for each of them send them (in a sync manner or as queue jobs, if you expect to have a lot of inactive users) expose ...


2

Not sure if there is a plugin that does this automatically, but you can build a small module that accomplishes this. Since it should run automatically in the background, I would create the functionality as a custom console command and then execute that command regularly in a cron job (for example, daily or hourly). The command would do the following: Check ...


1

Still not quite sure I understand the problem completely, but here are some ideas to get you started. Your workflow requires three steps: Fetch the XML data from the external API. Parse the XML (the SOAP namespace may require some attention) into a usable format. Filter and display the parsed data in your template. I assume your existing code is based on ...


1

If you don't want to directly embed a Facebook feed using the Page Plugin, you'll have to either use Facebook's API directly or find a third-party service to take care of this for you. Facebook API Take a look at the facebook developer docs to get started. There's an official PHP SDK (library), though it doesn't look like it's supported anymore. The Facebook ...


1

"repositories": [ { "type": "path", "url": "plugins/redactor" } ] With that in your composer.json file, you're telling Composer to look in a plugins/redactor folder from the root of your project and use that to satisfy the "craftcms/redactor" dependency (instead of pulling it ...


1

Sounds like a custom plugin or module would work for you here, allowing you to hook into the entry after save event. use craft\elements\Entry; use craft\events\ModelEvent; use yii\base\Event; Event::on( Entry::class, Entry::EVENT_AFTER_SAVE, function(ModelEvent $event) { $entry = $event->sender; if (!$entry->getIsDraft()) {...


1

This could be a PHP memory limit issue but it's hard to say until you get access to the log files or can output the error to the browser instead of a blank page. I would first make sure devMode is enabled in Craft. Then I would look at the log files in storage/logs/web.log or storage/logs/php-errors.log. There might be a lot of stuff logged already, so ...


1

Yes, you could install the Amazon S3 Plugin in order to select & configure that Volume type in your control panel. After installing that you will get new volume type “Amazon S3” in Settings → Assets → New Volume.

 Now you can create new column and using it you can store your assets in Amazon S3 cloud service.


1

If you look in your config/general.php, you will probably find that you have 'allowUpdates' => false set for the environment you are trying to trial the plugin on (stage/prod?). Change that to 'allowUpdates' => true and you will be able to install what you want.


1

Okay, so this seems to be the incompatibility issue between craftcms/plugin-installer < 1.5.6 and Composer 2: https://github.com/craftcms/plugin-installer/issues/5 The solution is to update in multiple steps: Do a normal composer update, which will fail for a couple of plugins, but will update craftcms/plugin-installer to 1.5.6. Delete the vendor folder. ...


1

Your code looks correct. Test with the following code in brands/_followButton. {{ currentUser ? 'Logged in' : 'Logged out' }} For some reason, it's not working and I can't figure out why. Can you explain what specifically is not working? And provide the version of Blitz that you're using?


1

Yes, looks like you'll need to look at the folder yiisoft and subfolders for permissions. Maybe set them to read, write until you're done and then change them to read only. Just thinking off the top of my head about what the issue could be.


1

I just saw this. Consider this plug-in: https://github.com/born05/craft-assetusage


1

I tried Fred Carsen's approach, but it didn't quite output what I expected. Here's my approach: // get categories $level1Categories = []; $level2Categories = []; $level3Categories = []; foreach ($product->productFamily->level(1)->all() as $category) { $level1Categories[] = $this->traverseCategory($category); } foreach ($product->...


1

This is what i did to get what i wanted. It's not the prettiest, but it works for now. I will have to soon make a PR on the repo and hope they merge it. In the vendor/olivestudio/craft-olivemenus folder, look for this class: OlivemenusService and add the method below: public function getAllMenus($siteId) { $menu = OlivemenusRecord::find() ...


Only top voted, non community-wiki answers of a minimum length are eligible