All add-ons currently require PHP 7.4 or greater.

On July 4th 2024 PHP 8.2 will be the new minimum requirement for all add-ons. Expect any add-on released after that date to require 8.2 or greater. Some releases may not immediately take advantage of 8.x specific features in PHP, which means you might, be able to continue using new releases in PHP 7.4, however, if you experience an error the first thing you should do is update to PHP 8.2 then create a support ticket if the error persists.

Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: {speedy:set_ttl}{expiration_date}{/speedy:set_ttl} shows error

Status Resolved
Add-on / Version Speedy 1.7.0
Severity
EE Version 7.3.6

Hop Studios

Jul 14, 2023

Getting an error when setting the ttl with {speedy:set_ttl}{expiration_date}{/speedy:set_ttl}
Warning
DateTime::modify(): Failed to parse time string ({expiration_date}) at position 0 ({): Unexpected character
user/addons/speedy/mod.speedy.php, line 417

Here's my template code:

{exp:speedy:fragment key="homepage" tags="homepage" ttl="86400"}
	{exp:channel:entries channel="topic_pages" status="open" limit="1" category="247" {DISABLE_SOME} }
		{!-- We need 2 entries for the second row at the top of the page, offset 1 because we already displayed the first one --}
		{speedy:set_ttl}{expiration_date}{/speedy:set_ttl}
		{topic_page_featured_entries limit="2" offset="1" var_prefix="row" {DISABLE} }
			{if "{row:row_count}" == 1}
			<section class="section-featured">
			{/if}

- Gil

#1

BoldMinded (Brian)

Comment has been marked private.

#2

Hop Studios

The set_ttl error is gone. But I’m now getting this error when viewing the speedy settings page in the CP. Reverting to the original copy of the add-on doesn’t show the same error. UnexpectedValueException Caught RecursiveDirectoryIterator::__construct(user/cache/speedy/stanford_social_innovation_review): Failed to open directory: No such file or directory user/addons/speedy/Service/Drivers/AbstractFilesystemDriver.php:244

Stack Trace: Please include when reporting this error

0 user/addons/speedy/Service/Drivers/AbstractFilesystemDriver.php(244): RecursiveDirectoryIterator->__construct(‘…’, 4096)

1 user/addons/speedy/Service/Drivers/FilesystemDriver.php(30): BoldMinded\Speedy\Service\Drivers\AbstractFilesystemDriver->getIterator()

2 user/addons/speedy/mcp.speedy.php(740): BoldMinded\Speedy\Service\Drivers\FilesystemDriver->countItems()

3 user/addons/speedy/mcp.speedy.php(66): Speedy_mcp->buildCacheInfoData()

4 [internal function]: Speedy_mcp->index()

5 ee/ExpressionEngine/Controller/Addons/Addons.php(1590): call_user_func_array(Array, Array)

6 ee/ExpressionEngine/Controller/Addons/Addons.php(866): ExpressionEngine\Controller\Addons\Addons->getModuleSettings(‘speedy’, ‘index’, Array)

7 [internal function]: ExpressionEngine\Controller\Addons\Addons->settings(‘speedy’)

8 ee/ExpressionEngine/Core/Core.php(268): call_user_func_array(Array, Array)

9 ee/ExpressionEngine/Core/Core.php(124): ExpressionEngine\Core\Core->runController(Array)

10 ee/ExpressionEngine/Boot/boot.php(184): ExpressionEngine\Core\Core->run(Object(ExpressionEngine\Core\Request))

11 admin.php(147): require_once(‘…’)

11 admin.php(147): require_once(‘…’)

#3

BoldMinded (Brian)

Help me out a bit, what cache driver are you using? Screenshot of your config maybe?

#4

BoldMinded (Brian)

File system obv, but static cache or normal file system cache?

#5

BoldMinded (Brian)

Have you verified that a file exists in the user/cache/speedy/stanford_social_innovation_review path?

#6

BoldMinded (Brian)

Have you tried clearing al of your cache and regenerating it?

#7

BoldMinded (Brian)

Sorry for the barrage of questions, but what is “stanford_social_innovation_review”? Is it the name of the site, or the fragment name? Can you take a screenshot of your user/cache/speedy folder with sub-folders expanded so I can see what’s in there?

#8

Hop Studios

Cache driver is File.

I tried clearing the EE Cache. Is that what you mean?

user/cache/speedy is empty. Should there be a file there?

admin.php?/cp/addons/settings/speedy is the page that’s giving me this error.

#9

Hop Studios

stanford_social_innovation_review is the site’s short name

#10

BoldMinded (Brian)

> user/cache/speedy is empty. Should there be a file there?

yes, there should be either a system/user/cache/speedy/default_site or system/user/cache/speedy/stanford_social_innovation_review folder

Is this an MSM site?

#11

Hop Studios

Which process is responsible for creating the stanford_social_innovation_review folder? Is that supposed to be created manually by myself or? This is not an MSM site; the site’s short name was always stanford_social_innovation_review from the beginning when the site was set up, so default_site is not used.

#12

BoldMinded (Brian)

Speedy should be able to create that folder. Does it not exist? If it doesn’t exist create it manually and see if it resolves the issue.

#13

Hop Studios

Manually creating the folder resolved the issue. I tried uninstalling and reinstalling before making the directory and the error was still showing.

#14

BoldMinded (Brian)

Ok, good to know. I’ll take a look at this… I’m guessing Speedy is expecting the default_site folder and isn’t creating the folder as I suspected.

#15

BoldMinded (Brian)

This should be fixed in 1.8.1

Login to reply