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 Warnings

Status Resolved
Add-on / Version Speedy 1.1.0
Severity
EE Version 5.3.0

Ian

Feb 10, 2020

Speedy Warnings

Also getting this randomly:

Warning
Use of undefined constant BASE - assumed ‘BASE’ (this will throw an Error in a future version of PHP)
ee/legacy/core/URI.php, line 333

Severity: E_WARNING
Warning
Cannot modify header information - headers already sent by (output started at ee/legacy/core/Exceptions.php:120)
ee/legacy/libraries/Functions.php, line 393

Severity: E_WARNING

I see another user submitted something similar:
https://boldminded.com/support/ticket/2071

I also can’t add any ignore urls.

#1

BoldMinded (Brian)

Ian, thanks for making the ticket. I really need more information though. What type of caching are you using? Static or fragment? Can you provide some template code if fragment caching. What URL are you visiting when you get those warning messages?

#2

Ian

Redis Static caching. I sent a photo did you not get it?

#3

Ian

Are you unable to login?

#4

Ian

https://ee5.navitend.com/sherman.php?/cp/addons/settings/speedy/driver_stats/redis&S=5390c311c59d61e50495413f0770b17e

#5

BoldMinded (Brian)

Photo uploads aren’t working, you can add a URL to a private message in the ticket though.

Even if you provide login info, it is not the first thing I do. I don’t just jump into people’s sites every time they submit a ticket and just try to fix something. You’re intimately familiar with the site, I am not. I’ve done that in the past and honestly half the time it turns out to not be a bug, but an configuration or template code issue or something.

Are you positive your htaccess rules are setup correctly and it is loading the index_redis_default_site.php file instead of your regular index.php file?

#6

Ian

Yes, and I also see now that doing that prevents freeform forms from submitting.

#7

BoldMinded (Brian)

Regarding the form submissions, it’s probably your CSRF token. https://docs.boldminded.com/speedy/docs/static-caching#csrf-tokens

#8

BoldMinded (Brian)

What is the URL in which the error you reported occurs? You provided the home page url, but I don’t see anything happening there.

#9

BoldMinded (Brian)

And what is the URL to the form page?

#10

Ian

/cp/addons/settings/speedy/driver_stats/

#11

BoldMinded (Brian)

So no errors on the front-end, just that driver stats page?

#12

Ian

Correct and the random error i posted is showing up on the back-end as well… randomly.

#13

Ian

regarding forms not submitting… i’ve excluded them from being cached and still having the issue. i also see that the form generating the csrf token is not being updated by speedy.

#14

Ian

further… ignore_post_requests… seems to be bunk

also just got this again at this page: /cp/members

Warning Use of undefined constant BASE - assumed ‘BASE’ (this will throw an Error in a future version of PHP) ee/legacy/core/URI.php, line 333

Severity: E_WARNING Warning Cannot modify header information - headers already sent by (output started at ee/legacy/core/Exceptions.php:120) ee/legacy/libraries/Functions.php, line 393

Severity: E_WARNING

Errors and warnings and more errors after installing speedy :-(

#15

BoldMinded (Brian)

Just to confirm, in your config, it’s set to “speedy_ignore_post_requests” not “ignore_post_requests”?

#16

Ian

$config[‘speedy_driver’] = ‘redis’; $config[‘speedy_static_enabled’] = ‘yes’; $config[‘speedy_ignore_post_requests’] = “yes”; $config[‘speedy_redis_settings’] = [ ‘static’ => ‘yes’, ‘servers’ => [ [ ‘host’ => ‘127.0.0.1’, ‘port’ => ‘6379’, ‘timeout’ => ‘0’, ‘password’ => null, ] ], ‘ignore_urls’ => [ [‘url’ => ‘review_network’],

],

];

#17

BoldMinded (Brian)

I logged into your CP and it says the Static driver is unsupported. Did you recently disable it?

https://d.pr/i/veksjX

#18

Ian

refresh. should all be there except for memcache/d

#19

BoldMinded (Brian)

Comment has been marked private.

#20

BoldMinded (Brian)

You said “I also can’t add any ignore urls.” - were you trying to do this through the CP before adding it to your config.php file and it did not work?

#21

Ian

correct! yeah i see that it was only working in config.php

still getting those random errors: $config[‘speedy_driver’] = ‘redis’; $config[‘speedy_static_enabled’] = ‘yes’; $config[‘speedy_ignore_post_requests’] = “yes”; $config[‘speedy_redis_settings’] = [ ‘static’ => ‘yes’, ‘servers’ => [ [ ‘host’ => ‘127.0.0.1’, ‘port’ => ‘6379’, ‘timeout’ => ‘0’, ‘password’ => null, ] ], ‘ignore_urls’ => [ [‘url’ => ‘review_network’],

], ];

and that page with the form will not submit (nor any currently) https://ee5.navitend.com/review_network.

#22

Ian

Sorry i meant this:

Warning Use of undefined constant BASE - assumed ‘BASE’ (this will throw an Error in a future version of PHP) ee/legacy/core/URI.php, line 333

Severity: E_WARNING Warning Cannot modify header information - headers already sent by (output started at ee/legacy/core/Exceptions.php:120) ee/legacy/libraries/Functions.php, line 393

Severity: E_WARNING

#23

BoldMinded (Brian)

Lets stick to 1 issue at a time and focus on the random error, then we’ll look at the ignore url, and then the form posting.

The random error, it literally happens on any page in the control panel only, not just on Speedy’s settings pages, and not on the front-end?

#24

Ian

It now appears randomly on any control panel page, this only started happening after installing Speedy. After Speedy I installed Char Limit add-on and got hit with the error. And after adding you as a member I got it and after refreshing the member page.

#25

BoldMinded (Brian)

What was your order number when you purchased Speedy?

#26

Ian

I understand it makes sense to work on issues in order 😊 I have another now on this page:

/cp/addons/settings/speedy/cache_clearing_settings/

Warning count(): Parameter must be an array or an object that implements Countable user/addons/speedy/mcp.speedy.php, line 1085

Severity: E_WARNING Warning Cannot modify header information - headers already sent by (output started at ee/legacy/core/Exceptions.php:120) ee/legacy/core/Input.php, line 238

Severity: E_WARNING Warning Cannot modify header information - headers already sent by (output started at ee/legacy/core/Exceptions.php:120) ee/legacy/libraries/Functions.php, line 393

Severity: E_WARNING

#27

Ian

Receipt from Packet Tide LLC
Receipt #1492-8781

#28

BoldMinded (Brian)

Also where did you get it from? EE Store or from boldminded.com? What I’m getting at is the license you entered is invalid, I don’t have any record of it. If you purchased from EE.com you need to claim the license. https://boldminded.com/claim.

It’s possible that Speedy is trying to do a license check and it is failing on a CP redirect and causing the error message.

#29

Ian

That claim form isn’t working. When I submit I get this url: https://boldminded.com/claim?error=1 with no real error message. When I look at licenses: https://boldminded.com/account/licenses, I have none. Here is the license: [removed b/c this wasn’t a private comment]

#30

BoldMinded (Brian)

I fixed this error:

count(): Parameter must be an array or an object that implements Countable
user/addons/speedy/mcp.speedy.php, line 1085
#31

Ian

Awesome! Thanks so much for your help with this! 😊 Getting there!!

#32

BoldMinded (Brian)

Ok, try to do the claim thing again.

#33

Ian

Message now: Sweet! Your license is no attached to your boldminded.com account. 😊

Though this still lists no licenses… though not sure it does: https://boldminded.com/account/licenses

#34

Ian

Also in the vein of forms… the simple search form on every page is not getting a unique csrf value.

Thanks!

#35

BoldMinded (Brian)

You’ll need to test the CSRF stuff without Speedy installed/enabled, make sure it is present in the forms to begin with, then install/enable Speedy.

Also, please provide a URL to the pages that contain a form so I can take a look. It might be worth setting up a very basic test template with nothing but a form in it, no extra JS, CSS, or HTML, just the necessary EE template code to render the form.

#36

Ian

I’ve tested the site and can confirm that the CSRF fields are fine and all the forms were working fine without speedy installed. Every page has a search function at the top of the site.

https://ee5.navitend.com/review_network has a form and this page too: https://ee5.navitend.com/events/see-you-at-leadingage-nj-annual-meeting-expo-booth-161

Search and these other pages were thoroughly tested and working pre-Speedy.

I’ll create stripped down templates of these as well if that’s absolutely needed.

#37

BoldMinded (Brian)

I can’t stress enough how stripped down templates help. I wrote a whole article about it 😊 https://u.expressionengine.com/article/debugging-in-expressionengine

#38

Ian

Got it. Here are the plain forms:

https://ee5.navitend.com/review_network-plain https://ee5.navitend.com/event_reg-plain/see-you-at-leadingage-nj-annual-meeting-expo-booth-161 https://ee5.navitend.com/search-plain

Search keeps on working which is nice. The other 2, looks like it’s throwing a 404 on the POST… I’m not sure why :-(

#39

Ian

When I do this:

https://ee5.navitend.com/index_redis_navitend.php/review_network-plain

And submit I get a 403 response. :-( again not totally understanding why.

Seems like an htaccess / speedy / freeform confusion going on. Frustratingly simple search form continues working great. hmm

#40

Ian

Well good call on the giving a completely stripped down template a go… https://ee5.navitend.com/whatgives

The template has 2 lines:

{exp:speedy:static} whatgives

Something from Speedy looks to be outputting:

int(0) int(0)

why?

#41

BoldMinded (Brian)

Ok, I think the csrf tokens are working now. There was an issue with the regex. I also had to add the {exp:speedy:static} tag to your review_network-plain template to get it to cache. Test out that form now and see if it is posting correctly.

I also had to comment out your “review_network” rule in the ignore_urls config value to get this to work.

#42

BoldMinded (Brian)

Those int(0) values was me testing the regex.

#43

Ian

Ok I’m confused why the review_network had to be commented out.

The url is review_network-plain

The token looks to be updated but the form still will not submit. It looks to be getting a 404 response. Is something hosed with my htaccess? Is there something not pointed right?

#44

Ian

If you are currently working on this, awesome. I’m able to submit forms everywhere now!

#45

Ian

I think everything now is in order! Thanks so much for all your help with this. 😊 I’m going to mark this as resolved!

Login to reply