itst
September 17, 2019, 10:06pm
1
Hi there!
I am new to Kirby, and working on a plugin that offers a video tag to be used in content.
I was using a few echos & var_dumps to get a better understanding of object structures and flows. While I was at it, I realized all my echos and var_dumps got executed twice, when I requested the public URL of a content I added my tag to.
Do I make sense?
What’s cooking there?
Thanks
Sascha
texnixe
September 17, 2019, 11:06pm
2
Without seeing your code, it’s impossible to tell what’s happening.
itst
September 19, 2019, 9:10am
3
My bad
See https://pastebin.com/fsnYMFnu
There’s a var_dump in line 53. In my content, there’s one call to the second tag. Yet, when I open the public page:
string(3) "XXX"
string(3) "XXX"
<!DOCTYPE html>
<html lang="en">
<head>
[…]
itst
September 26, 2019, 10:01pm
4
Any ideas? I have tinkered with Kirby in the past days. Nothing made me understand this behavior, tho.
texnixe
September 26, 2019, 10:33pm
5
The code in the link does no longer exist?
1 Like
itst
September 27, 2019, 9:46am
6
Oh dang. The pasteboard expired.
I will update it ASAP. My bad!
texnixe
September 28, 2019, 10:37am
7
You can post your code here instead of someplace else if you want.
itst
October 1, 2019, 7:56am
8
Pastebin is rather natural for me, if that’s not too inconvenient.
https://pastebin.com/bx3ciCeW
In line 23, there’s a var_dump. It‘s executed twice on my local machine, with Kirby‘s cache off and debugging enabled, if that‘s important.
Hmm.
Hm, I can’t reproduce the duplicate var_dump in a 3.2.5 Starterkit. Does your text file only contain a single tag?
itst
October 1, 2019, 10:25am
10
That was my first guess too, but it isn’t the case. The file contains only one tag.
My local installation is still on 3.2.4, I’ll test it with the current version and report back.
Thank you!
itst
October 4, 2019, 9:04pm
11
Must have been a hickup in my brain. Cannot reproduce. My bad.
texnixe
October 4, 2019, 10:01pm
12
That’s better than a bug in Kirby