Community Digest

Top new questions this week:

My site has been hacked. I have managed to clean it up. But now, most of my links are looping back to the home page

My site was hacked by a Russian hacker. I know because the characters were Russian on one of the files he left. I have cleaned up the site, but many of the links are looping back to the home page. ...

craft2  
user avatar asked by Alex Briones Score of 1
user avatar answered by 4midori Score of 3

Craft 4 DB connection works in WEB context but not from Craft's console command

We just completed an upgrade from Craft 3 to 4 (latest version) and now all web requests (FE+CP) work, but not the console commands, it can not connect to the database ./craft users/list-admins ...

database craft4 console connection  
user avatar asked by Matthias Redl-Mann Score of 1
user avatar answered by August Miller Score of 1

Greatest hits from previous weeks:

Why choose Craft Commerce over Magento

We have 2 clients that want to have an online shop website. One with 100 products, with 10,000 products. We've built 100's of websites, but no e-commerce sites yet. We're in the stage of writing the ...

plugin-craftcommerce  
user avatar asked by tom Score of 6
user avatar answered by Jeremy Daalder Score of 23

Display a copyright year (or range)

I have an old php code in the footer of my site like below. Will like to convert that to twig (which I suspect will be cleaner). I don't know a lick of php hence my question here. <p> <? ...

templating php  
user avatar asked by juju Score of 4
user avatar answered by Lindsey D Score of 10

Carbon 1 is deprecated - migrate to Carbon 2

Is anyone getting this when running a composer update command? Local install: Craft CMS 3.1.31 update --no-interaction --ansi  Loading composer repositories with package information  Updating ...

composer  
user avatar asked by Nutmeg Score of 5
user avatar answered by Alban Jubert Score of 6

Test for empty field?

How do I check if a field is blank? I thought it was something like {% if article.articleImage is defined %} Which in this case is testing an Assets field (and seems to work). Tried the same for a ...

templating matrix  
user avatar asked by pumkincreative Score of 30
user avatar answered by Brandon Kelly Score of 53

How to write a simple navigation?

After endless trial and error I figured out the right syntax for a simple one level navigation. {% set navi = craft.entries.section('not projekteintrag' ) %} {% for entry in navi.order('id asc') %} ...

templating navigation singles  
user avatar asked by KSPR Score of 17
user avatar answered by Keith Mancuso Score of 19

All images uploading... except JPG files

No idea why but my local install of CraftCMS (in a MAMP environment) won't let me upload JPGs. PNG, GIF, even TIFF works (just for the heck of it). When I select the file in the browser dialog, it ...

assets server mamp  
user avatar asked by Jeremy P. Beasley Score of 6
user avatar answered by PhilR Score of 13

Is there a way to output only the first paragraph of a Rich Text field?

I have a rich text output section I want to limit to the first paragraph so I can link to a full version on another page. What's the best way to do this?

richtext  
user avatar asked by Allen Pieper Score of 20
user avatar answered by Brandon Kelly Score of 29
You're receiving this message because you subscribed to the Craft CMS community digest.
Unsubscribe from this community digest       Edit email settings       Leave feedback       Privacy
Stack Overflow

Stack Overflow, 14 Wall Street, 20th Floor, New York, NY 10005

<3