statamic / cms

The core Laravel CMS Composer package
https://statamic.com
Other
4.05k stars 531 forks source link

Antlers Runtime parser breaks partials #6240

Closed nn-dmt closed 2 years ago

nn-dmt commented 2 years ago

Bug description

Switching site from regex to runtime, some minor changes were needed in some antlers code - all went well except that my partials for 'buy buttons' stopped functioning entirely.

I get no errors on the statamic log. Switching the site back to regex, the buttons and placid code inside load immediately. Switching back to runtime, buttons and placid code disappear and never get rendered into page, apparently.

How to reproduce

I am calling in the partial as so:

   <div class="pt-8">

        {{ partial:partials/buy }}

   </div>

and my partial code is:

<section>
{{ if price_fiat > 0 }}
{{ if snipcart_guid }}
<div class="mt-4 shadow-md inline-block hover:text-white text-strong text-sm bg-white text-gray-800 hover:bg-green-600 rounded-lg px-6 py-2 mx-2">
<button
    class="snipcart-add-item"
  data-item-id="{{ slug }}"
  data-item-price="{{ price_fiat }}"
  data-item-url="{{ url }}"
  data-item-description="{{ content }}"
  data-item-image="{{ album_artwork }}"
  data-item-file-guid="{{ snipcart_guid }}"
  data-item-name="{{ title }}">
<b>BUY ALBUM ${{ price_fiat}} USD</b>
</button>
{{ /if }}
</div>
{{ /if }}

{{ if price_ergo > 0 }}
<div class="mt-4 shadow-md inline-block text-white text-strong text-sm bg-yellow-600 hover:text-gray-800 hover:bg-white rounded-lg px-6 py-2 mx-2">
<button>
<a class="no-underline" target="_blank" href="https://dev.swamp.audio/pay.html?address={{ if artist_ergo }}{{ display }}{{ else }}{{ swamp_ergo }}{{ /if }}&currency=ERG&amount={{ price_ergo }}&ref={{ catalog_number }}{{ csrf_token }}"><b>BUY ALBUM ∑ {{ price_ergo }} ERG</b></a>
</button>
</div>

{{  placid
    host="http://localhost:3030"
    path="/"
    query="address:9gpeMRQZvvAbqAmMowXS9zfkr4GCAQLgJs93N3ZotXUpC36TcLW|limit:200|ref:{ catalog_number }{ csrf_token }"
}}

{{ response.data }}
<div class="mt-4 shadow-md inline-block hover:text-white text-strong text-sm bg-white text-gray-800 hover:bg-green-600 rounded-lg px-6 py-2 mx-2">

<a href="{{ zip:archive :filename='title' }}">
<button>Download {{ title }}
</button>
</a>        

</div>
{{ /response.data }}
{{ /placid }}

{{ /if }}
</section>

Logs

no logs show for this :(

Versions

Statamic 3.3.16 Pro Laravel 9.17.0 PHP 8.1.6 aerni/zipper 1.6.1 alpshq/statamic-cache-evader 1.4.1 aryehraber/statamic-color-extractor 1.3.0 aryehraber/statamic-logbook 2.1.0 aryehraber/statamic-uuid 2.1.0 cnj/seotamic 2.0.6 codedge/statamic-move-entries 1.1 doublethreedigital/duplicator 2.3.0 jacksleight/statamic-lazy-logo 0.3.3 objectivehtml/statamic-events 0.11.0 octoper/statamic-blade-components 2.0.0 ritson/placid-statamic 3.1.0 sortarad/needledrop 1.0.1 statamic/collaboration 0.4.0 statamic/podcast-categories 1.0.1 stillat/relationships 1.0.2 thoughtco/statamic-restrict-fields 1.0.2 youfront/statamic-export 1.0.3

Installation

Starter Kit using via CLI

Antlers Parser

runtime (new)

Additional details

No response

ryanmitchell commented 2 years ago

I wonder if its the short hand format.... did you try {{ partial src="partials/buy" }} ?

nn-dmt commented 2 years ago

I wonder if its the short hand format.... did you try {{ partial src="partials/buy" }} ?

Yes, i did. I tried changing the if conditions, the partial format,

Removing the if conditions inside the partial and putting simply "hello" instead, renders hello. So the partial IS loading, just not loading the if conditions for some reason

edalzell commented 2 years ago

Starting taking bits out to find the actual issue.

Also, if you dump those vars what do you see?

nn-dmt commented 2 years ago

Starting taking bits out to find the actual issue.

Also, if you dump those vars what do you see?

Dump is telling me that my "price_fiat" and "price_ergo" variables (which are integers in the blueprint) are registering as null, which is incorrect because they have a numerical value set. Regex recognizes them , runtime doesn't.

Confirmed via removing if conditions for price_fiat and price_ergo.

JohnathonKoster commented 2 years ago

If you {{ dump }} before the partial is included, do the variables show up as expected (not null)?

nn-dmt commented 2 years ago

If you {{ dump }} before the partial is included, do the variables show up as expected (not null)?

Yes, when i wrap the partial in {{ dump }} tags they still appear as null.

"price_ergo" => Statamic\Fields\Value {#5792 ▼
    #raw: null
    #handle: "price_ergo"
    #fieldtype: Statamic\Fieldtypes\Integer {#5860 ▶}
    #augmentable: Statamic\Entries\Entry {#5299 ▶}
    #shallow: false
  }
  "price_fiat" => Statamic\Fields\Value {#5802 ▼
    #raw: null
    #handle: "price_fiat"
    #fieldtype: Statamic\Fieldtypes\Integer {#5862 ▶}
    #augmentable: Statamic\Entries\Entry {[#5299 ▶](https://swamp.test/music/album/slum-light#sf-dump-103738772-ref25299)}
    #shallow: false
  }
nn-dmt commented 2 years ago

If you {{ dump }} before the partial is included, do the variables show up as expected (not null)?

When i wrap the entirety of the template in {{ dump }} tags, it properly displays the value.

"price_ergo" => Statamic\Fields\Value {#2731 ▼
    #raw: 5
    #handle: "price_ergo"
    #fieldtype: Statamic\Fieldtypes\Integer {#2995 ▶}
    #augmentable: Statamic\Entries\Entry {#2238 ▶}
    #shallow: false
  }
  "price_fiat" => Statamic\Fields\Value {#2994 ▼
    #raw: 5
    #handle: "price_fiat"
    #fieldtype: Statamic\Fieldtypes\Integer {#2998 ▶}
    #augmentable: Statamic\Entries\Entry {[#2238 ▶](https://swamp.test/music/album/slum-light#sf-dump-158826379-ref22238)}
    #shallow: false
  }
edalzell commented 2 years ago

what do you mean, can you please show both things you tried wrt to dump?

nn-dmt commented 2 years ago

what do you mean, can you please show both things you tried wrt to dump?

release.antlers.html

{{ dump }}
<div class="pt-6 mx-auto relative z-10">
<div class="mx-auto rounded-lg shadow-2xl mx-auto bg-cover max-w-6xl bg-repeat-y bg-center" style="background-image: url('{{ glide:album_artwork format="webp" }}')">
<div class="mx-auto rounded-lg mx-auto px-8 max-w-6xl bg-gradient-to-br bg-opacity-75 from-gray-200 backdrop-blur-sm md:backdrop-blur-none">
<div class="mx-auto">
    <div class="flex items-start">
        <article class="py-12 pr-12 md:pr-24 flex-1">
            <h1 class="">{{ title }}</h1>
            <div class="mt-4 flex items-start">
                <div>
        <p class="text-gray-800 text-lg">{{ release_type:title }} by: 
            {{ release_artist }}
            <a class="no-underline" href="{{ url }}">{{ title }}</a>{{ if release_artist > 1 }} <span class="text-gray-300 text-xs"> •</span>{{ /if }}
            {{ /release_artist }}
            </p>
            <div class="mt-1 font-mono text-gray-500 text-xs flex space-x-3 uppercase tracking-widest">
                        <span>Release Date: {{ release_date }}</span>
                        <span>/</span>
                        <span>Catalog Number: {{ catalog_number }}</span>
            </div>
                </div>
            </div>
            <div class="content pt-8">
    {{ content }}

<section>
<h2 class="pt-8">Track list</h2>

    {{ select_tracks }}
    {{ entries_field }}
                {{ partial:music/card }}
    {{ /entries_field }}

            {{ /select_tracks }}

</section>
        <div class="pt-8">

        {{ partial:partials/buy }}

    </div>
<section>
{{ if credits }}
<div class="pt-8">
{{ credits }}
<div class="mb-2">
<a class="no-underline rounded-md text-white mb-3 px-2 py-1 bg-gray-600 bg-opacity-75" href="{{ entries_field:0:url }}">{{ entries_field:0:title }}</a> <span class="rounded-md text-gray-700 mb-3 px-2 py-1 bg-gray-100 bg-opacity-75">{{ reason }}</span><br>
</div>
{{ /credits }}
{{ /if }}
</section>

        </article>
        <div class="hidden md:block w-[300px] relative mt-6">
        <img src="{{ glide:album_artwork square="600" format="webp" }}" 
            alt="{{ artwork:alt ?? "Album Artwork" }}" width="300" class="shadow-2xl inset-0 absolute z-10 rounded-full hover:animate-spin hover:duration-700 ease-in-out transform-gpu">

        </div>

    </div>

</div>
</div>
</div>

</div>

Dump output:

^ array:95 [▼
  "album_artwork" => Statamic\Fields\Value {#2261 ▶}
  "amp_url" => Statamic\Fields\Value {#2492 ▶}
  "api_url" => Statamic\Fields\Value {#2547 ▶}
  "archive" => Statamic\Fields\Value {#2597 ▶}
  "archive_cdn" => Statamic\Fields\Value {#2588 ▶}
  "blueprint" => Statamic\Fields\Value {#2498 ▶}
  "catalog_number" => Statamic\Fields\Value {#2485 ▶}
  "collection" => Statamic\Fields\Value {#2482 ▶}
  "config" => array:29 [▶]
  "content" => Statamic\Fields\Value {#2493 ▶}
  "cp_url" => "https://swamp.test/cp"
  "credits" => Statamic\Fields\Value {#2540 ▶}
  "csrf_field" => Illuminate\Support\HtmlString {#2218 ▶}
  "csrf_token" => "t4DzCQPVmBIOES9OM74a4ecLf02ZsXGKnR1B6Rq3"
  "current_date" => Illuminate\Support\Carbon @1655918338 {[#2253 ▶](https://swamp.test/music/album/slum-light#sf-dump-909255960-ref22253)}
  "current_full_url" => "https://swamp.test/music/album/slum-light"
  "current_template" => "music/release"
  "current_uri" => "/music/album/slum-light"
  "current_url" => "https://swamp.test/music/album/slum-light"
  "current_user" => Statamic\Auth\File\User {#2244 ▶}
  "date" => Statamic\Fields\Value {#2575 ▶}
  "edit_url" => Statamic\Fields\Value {#2533 ▶}
  "entry_id" => Statamic\Fields\Value {#2490 ▶}
  "environment" => "local"
  "ergo" => Statamic\Globals\Variables {[#2353 ▶](https://swamp.test/music/album/slum-light#sf-dump-909255960-ref22353)}
  "errors" => Illuminate\Support\ViewErrorBag {#2164 ▶}
  "get" => []
  "get_post" => []
  "homepage" => "/"
  "id" => Statamic\Fields\Value {#2477 ▶}
  "is_entry" => Statamic\Fields\Value {#2511 ▶}
  "is_homepage" => false
  "label" => Statamic\Fields\Value {#2241 ▶}
  "last_modified" => Statamic\Fields\Value {#2502 ▶}
  "last_segment" => "slum-light"
  "locale" => Statamic\Fields\Value {#2537 ▶}
  "logged_in" => true
  "logged_out" => false
  "mount" => Statamic\Fields\Value {#2467 ▶}
  "now" => Illuminate\Support\Carbon @1655918338 {[#2253 ▶](https://swamp.test/music/album/slum-light#sf-dump-909255960-ref22253)}
  "old" => []
  "order" => Statamic\Fields\Value {#2580 ▶}
  "origin_id" => Statamic\Fields\Value {#2491 ▶}
  "page" => Statamic\Structures\Page {#2262 ▶}
  "parent" => Statamic\Fields\Value {#2647 ▶}
  "permalink" => Statamic\Fields\Value {#2813 ▶}
  "podcast" => Statamic\Globals\Variables {[#2346 ▶](https://swamp.test/music/album/slum-light#sf-dump-909255960-ref22346)}
  "post" => []
  "price_ergo" => Statamic\Fields\Value {#2731 ▼
    #raw: 5
    #handle: "price_ergo"
    #fieldtype: Statamic\Fieldtypes\Integer {#2995 ▶}
    #augmentable: Statamic\Entries\Entry {[#2238 ▶](https://swamp.test/music/album/slum-light#sf-dump-909255960-ref22238)}
    #shallow: false
  }
  "price_fiat" => Statamic\Fields\Value {#2994 ▼
    #raw: 5
    #handle: "price_fiat"
    #fieldtype: Statamic\Fieldtypes\Integer {#2998 ▶}
    #augmentable: Statamic\Entries\Entry {[#2238 ▶](https://swamp.test/music/album/slum-light#sf-dump-909255960-ref22238)}
    #shallow: false
  }
  "private" => Statamic\Fields\Value {#3000 ▶}
  "published" => Statamic\Fields\Value {#2993 ▶}
  "release_artist" => Statamic\Fields\Value {#2996 ▶}
  "release_date" => Statamic\Fields\Value {#3002 ▶}
  "release_type" => Statamic\Fields\Value {#3005 ▶}
  "response_code" => 200
  "segment_0" => ""
  "segment_1" => "music"
  "segment_2" => "album"
  "segment_3" => "slum-light"
  "select_tracks" => Statamic\Fields\Value {#3008 ▶}
  "seotamic_canonical" => Statamic\Fields\Value {#3011 ▶}
  "seotamic_custom_meta_description" => Statamic\Fields\Value {#3014 ▶}
  "seotamic_custom_open_graph_description" => Statamic\Fields\Value {#3017 ▶}
  "seotamic_custom_open_graph_title" => Statamic\Fields\Value {#3020 ▶}
  "seotamic_custom_title" => Statamic\Fields\Value {#3023 ▶}
  "seotamic_custom_twitter_description" => Statamic\Fields\Value {#3026 ▶}
  "seotamic_custom_twitter_title" => Statamic\Fields\Value {#3029 ▶}
  "seotamic_image" => Statamic\Fields\Value {#3032 ▶}
  "seotamic_meta" => Statamic\Fields\Value {#3035 ▶}
  "seotamic_meta_description" => Statamic\Fields\Value {#3038 ▶}
  "seotamic_open_graph_description" => Statamic\Fields\Value {#3041 ▶}
  "seotamic_open_graph_title" => Statamic\Fields\Value {#3044 ▶}
  "seotamic_social" => Statamic\Fields\Value {#3047 ▶}
  "seotamic_title" => Statamic\Fields\Value {#3050 ▶}
  "seotamic_title_append" => Statamic\Fields\Value {#3053 ▶}
  "seotamic_title_prepend" => Statamic\Fields\Value {#3056 ▶}
  "seotamic_twitter_description" => Statamic\Fields\Value {#3059 ▶}
  "seotamic_twitter_title" => Statamic\Fields\Value {#3062 ▶}
  "site" => Statamic\Sites\Site {[#535 ▶](https://swamp.test/music/album/slum-light#sf-dump-909255960-ref2535)}
  "sites" => Illuminate\Support\Collection {#2427 ▶}
  "slug" => Statamic\Fields\Value {#3068 ▶}
  "snipcart_guid" => Statamic\Fields\Value {#3064 ▶}
  "status" => Statamic\Fields\Value {#3074 ▶}
  "swamp_ergo" => Statamic\Fields\Value {#3070 ▶}
  "template" => Statamic\Fields\Value {#3078 ▶}
  "theme" => Statamic\Globals\Variables {[#2370 ▶](https://swamp.test/music/album/slum-light#sf-dump-909255960-ref22370)}
  "title" => Statamic\Fields\Value {#3076 ▶}
  "today" => Illuminate\Support\Carbon @1655918338 {[#2253 ▶](https://swamp.test/music/album/slum-light#sf-dump-909255960-ref22253)}
  "updated_at" => Statamic\Fields\Value {#2999 ▶}
  "updated_by" => Statamic\Fields\Value {#3083 ▶}
  "uri" => Statamic\Fields\Value {#3084 ▶}
  "url" => Statamic\Fields\Value {#3085 ▶}
  "view" => []
  "xml_header" => "<?xml version="1.0" encoding="utf-8" ?>"
]
nn-dmt commented 2 years ago

Dumping just partial:

        <div class="pt-8">
            {{ dump }}
        {{ partial:partials/buy }}
            {{ /dump }}
    </div>

Dump:

^ array:117 [▼
  "album_artwork" => Statamic\Fields\Value {#2261 ▶}
  "amp_url" => Statamic\Fields\Value {[#5674 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25674)}
  "api_url" => Statamic\Fields\Value {[#5735 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25735)}
  "archive" => Statamic\Fields\Value {#2597 ▶}
  "archive_cdn" => Statamic\Fields\Value {#2588 ▶}
  "artist_name" => Statamic\Fields\Value {[#5732 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25732)}
  "artwork" => Statamic\Fields\Value {[#5272 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25272)}
  "audio_file" => Statamic\Fields\Value {[#5736 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25736)}
  "blueprint" => Statamic\Fields\Value {[#5742 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25742)}
  "catalog_number" => Statamic\Fields\Value {#2485 ▶}
  "collection" => Statamic\Fields\Value {[#5746 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25746)}
  "config" => array:29 [▶]
  "content" => Statamic\Fields\Value {#2493 ▶}
  "count" => 2
  "cp_url" => "https://swamp.test/cp"
  "credits" => Statamic\Fields\Value {#2540 ▶}
  "csrf_field" => Illuminate\Support\HtmlString {#2218 ▶}
  "csrf_token" => "t4DzCQPVmBIOES9OM74a4ecLf02ZsXGKnR1B6Rq3"
  "current_date" => Illuminate\Support\Carbon @1655918490 {[#2253 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref22253)}
  "current_full_url" => "https://swamp.test/music/album/slum-light"
  "current_template" => "music/release"
  "current_uri" => "/music/album/slum-light"
  "current_url" => "https://swamp.test/music/album/slum-light"
  "current_user" => Statamic\Auth\File\User {#2244 ▶}
  "date" => Statamic\Fields\Value {[#5747 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25747)}
  "description" => Statamic\Fields\Value {[#5748 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25748)}
  "edit_url" => Statamic\Fields\Value {[#5744 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25744)}
  "entries_field" => Statamic\Fields\Value {#5240 ▶}
  "entry_id" => Statamic\Fields\Value {#2490 ▶}
  "environment" => "local"
  "ergo" => Statamic\Globals\Variables {#2353 ▶}
  "errors" => Illuminate\Support\ViewErrorBag {#2164 ▶}
  "explicit" => Statamic\Fields\Value {[#5750 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25750)}
  "first" => false
  "get" => []
  "get_post" => []
  "google_block" => Statamic\Fields\Value {[#5754 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25754)}
  "homepage" => "/"
  "id" => Statamic\Fields\Value {[#5757 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25757)}
  "index" => 1
  "is_entry" => Statamic\Fields\Value {[#5761 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25761)}
  "is_homepage" => false
  "itunes_block" => Statamic\Fields\Value {[#5753 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25753)}
  "label" => Statamic\Fields\Value {#2241 ▶}
  "last" => false
  "last_modified" => Statamic\Fields\Value {[#5762 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25762)}
  "last_segment" => "slum-light"
  "locale" => Statamic\Fields\Value {[#5764 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25764)}
  "logged_in" => true
  "logged_out" => false
  "lyrics" => Statamic\Fields\Value {[#5766 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25766)}
  "mount" => Statamic\Fields\Value {[#5770 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25770)}
  "next" => array:62 [▶]
  "now" => Illuminate\Support\Carbon @1655918490 {[#2253 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref22253)}
  "old" => []
  "order" => Statamic\Fields\Value {[#5799 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25799)}
  "origin_id" => Statamic\Fields\Value {[#5798 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25798)}
  "page" => Statamic\Structures\Page {#2262 ▶}
  "parent" => Statamic\Fields\Value {#2647 ▶}
  "permalink" => Statamic\Fields\Value {[#5859 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25859)}
  "podcast" => Statamic\Globals\Variables {#2346 ▶}
  "post" => []
  "prev" => array:64 [▶]
  "price_ergo" => Statamic\Fields\Value {[#5792 ▼](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25792)
    #raw: null
    #handle: "price_ergo"
    #fieldtype: Statamic\Fieldtypes\Integer {#5860 ▶}
    #augmentable: Statamic\Entries\Entry {[#5299 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25299)}
    #shallow: false
  }
  "price_fiat" => Statamic\Fields\Value {[#5802 ▼](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25802)
    #raw: null
    #handle: "price_fiat"
    #fieldtype: Statamic\Fieldtypes\Integer {#5862 ▶}
    #augmentable: Statamic\Entries\Entry {[#5299 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25299)}
    #shallow: false
  }
  "private" => Statamic\Fields\Value {[#5863 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25863)}
  "published" => Statamic\Fields\Value {[#5865 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25865)}
  "release" => Statamic\Fields\Value {[#5866 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25866)}
  "release_artist" => Statamic\Fields\Value {#2996 ▶}
  "release_date" => Statamic\Fields\Value {[#5868 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25868)}
  "release_type" => Statamic\Fields\Value {#3005 ▶}
  "remixer" => Statamic\Fields\Value {[#5858 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25858)}
  "response_code" => 200
  "segment_0" => ""
  "segment_1" => "music"
  "segment_2" => "album"
  "segment_3" => "slum-light"
  "select_tracks" => Statamic\Fields\Value {#3008 ▶}
  "seotamic_canonical" => Statamic\Fields\Value {[#5871 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25871)}
  "seotamic_custom_meta_description" => Statamic\Fields\Value {[#5874 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25874)}
  "seotamic_custom_open_graph_description" => Statamic\Fields\Value {[#5877 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25877)}
  "seotamic_custom_open_graph_title" => Statamic\Fields\Value {[#5880 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25880)}
  "seotamic_custom_title" => Statamic\Fields\Value {[#5883 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25883)}
  "seotamic_custom_twitter_description" => Statamic\Fields\Value {[#5886 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25886)}
  "seotamic_custom_twitter_title" => Statamic\Fields\Value {[#5889 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25889)}
  "seotamic_image" => Statamic\Fields\Value {[#5892 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25892)}
  "seotamic_meta" => Statamic\Fields\Value {[#5895 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25895)}
  "seotamic_meta_description" => Statamic\Fields\Value {[#5898 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25898)}
  "seotamic_open_graph_description" => Statamic\Fields\Value {[#5901 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25901)}
  "seotamic_open_graph_title" => Statamic\Fields\Value {[#5904 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25904)}
  "seotamic_social" => Statamic\Fields\Value {[#5907 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25907)}
  "seotamic_title" => Statamic\Fields\Value {[#5910 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25910)}
  "seotamic_title_append" => Statamic\Fields\Value {[#5913 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25913)}
  "seotamic_title_prepend" => Statamic\Fields\Value {[#5916 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25916)}
  "seotamic_twitter_description" => Statamic\Fields\Value {[#5919 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25919)}
  "seotamic_twitter_title" => Statamic\Fields\Value {[#5922 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25922)}
  "site" => Statamic\Sites\Site {[#535 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref2535)}
  "sites" => Illuminate\Support\Collection {#2427 ▶}
  "slot" => null
  "slug" => Statamic\Fields\Value {[#5928 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25928)}
  "snipcart_guid" => Statamic\Fields\Value {#3064 ▶}
  "status" => Statamic\Fields\Value {[#5931 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25931)}
  "summary" => Statamic\Fields\Value {[#5933 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25933)}
  "swamp_ergo" => Statamic\Fields\Value {#3070 ▶}
  "template" => Statamic\Fields\Value {#3078 ▶}
  "theme" => Statamic\Globals\Variables {#2370 ▶}
  "title" => Statamic\Fields\Value {[#5934 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25934)}
  "today" => Illuminate\Support\Carbon @1655918490 {[#2253 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref22253)}
  "total_results" => 3
  "track_number" => Statamic\Fields\Value {[#5925 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25925)}
  "track_type" => Statamic\Fields\Value {[#5938 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25938)}
  "updated_at" => Statamic\Fields\Value {[#5941 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25941)}
  "updated_by" => Statamic\Fields\Value {[#5949 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25949)}
  "uri" => Statamic\Fields\Value {[#5954 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref25954)}
  "url" => Statamic\Fields\Value {[#6124 ▶](https://swamp.test/music/album/slum-light#sf-dump-1027327854-ref26124)}
  "view" => []
  "xml_header" => "<?xml version="1.0" encoding="utf-8" ?>"
nn-dmt commented 2 years ago

When dumping just the partial, a new array shows up... seems like a glitch: Screen Shot 2022-06-22 at 10 36 22 AM

JohnathonKoster commented 2 years ago

I'd start the same process with the template that includes the partial.

Leave just {{ partial:partials/buy }} in there and check if the values are correct, then start adding things back to that template until it breaks again. Looks like something is messing up the scope somewhere (which can be tricky to track down)

nn-dmt commented 2 years ago

I'd start the same process with the template that includes the partial.

Leave just {{ partial:partials/buy }} in there and check if the values are correct, then start adding things back to that template until it breaks again. Looks like something is messing up the scope somewhere (which can be tricky to track down)

Confirmed, removing all template content except the partial - the partial loads properly.

Will begin to edit the page and figure out what is happening...

nn-dmt commented 2 years ago

I'd start the same process with the template that includes the partial.

Leave just {{ partial:partials/buy }} in there and check if the values are correct, then start adding things back to that template until it breaks again. Looks like something is messing up the scope somewhere (which can be tricky to track down)

Well that was easy,

Here is the code which breaks the other partial:

    {{ select_tracks }}
    {{ entries_field }}
                {{ partial:music/card }}
    {{ /entries_field }}

            {{ /select_tracks }}

I believe i fixed it with this.... but then it breaks the music card partial and makes it dissapear :


    {{ select_tracks:entries_field }}

                {{ partial:music/card }}

            {{ /select_tracks:entries_field }}
nn-dmt commented 2 years ago

I fixed it. I needed to add {{ entries_field }} {{ /entries_field }} to the partial and remove it from the release page.