Bug: Continuous Page Refresh in Builder.io Preventing Deletion

Hello Builder.io community,

I encountered a bug where the page continuously refreshes between [id] and [id]/edit whenever I try to open it (see attached screenshot). Due to this issue, it is impossible to delete the page directly. The only thing I can do is set the page to “unpublished” via the overview, but that doesn’t solve the issue.

This bug makes it impossible to manage the page properly. Could you please provide a solution or guidance on how to fix this? Or i would like to see a delete button in the content overview instead of unpublish.

I found out the page is crashing when i add a certain custom component. However it keeps crashing if i delete the fields except the title.

{
        component: HeroStats,
        name: 'HeroStats',
        image: 'https://cdn.builder.io/api/v1/image/assets%2Fa5c3f8e0efc04690b8b91ea8779cb542%2Ff7ad0638777f44deafb578e14498db35',
        inputs: [
            // {
            //     name: 'theme',
            //     type: 'enum',
            //     enum: ['default', 'vacancies'],
            // },
            {
                name: 'title',
                type: 'string',
                defaultValue: 'This is a title'
            },
            // {
            //     name: 'media',
            //     type: 'file',
            //     defaultValue: DemoImage
            // },
            // {
            //     name: 'buttons',
            //     type: 'list',
            //     defaultValue: [ 
            //         { buttonText: 'Button Text' 
            //     }],
            //     subFields: [
            //         {
            //             name: 'buttonText',
            //             type: 'string',
            //             defaultValue: 'Klik hier!',
            //         },
            //         {
            //             name: 'buttonUrl',
            //             type: 'string',
            //             defaultValue: '/',
            //         },
            //         {
            //             name: 'variant',
            //             type: 'string',
            //             defaultValue: 'primary',
            //             enum: ['primary', 'link'],
            //         },
            //     ],
            // },
            // {
            //     showIf: `options.get('theme') === 'default'`,
            //     name: 'usps',
            //     type: 'list',
            //     defaultValue: [ 
            //         { uspText: 'lorem ipsum dolor sit amet' 
            //     }],
            //     subFields: [
            //         {
            //             name: 'number',
            //             type: 'number',
            //             defaultValue: 199,
            //         },
            //         {
            //             name: 'uspText',
            //             type: 'string',
            //             defaultValue: 'lorem ipsum dolor sit amet',
            //         },
            //     ],
            // },
        ],
        canHaveChildren: true,
    },

Component:

<script>
    import { page } from '$app/stores';

    // export let theme;
    // export let title;
    // export let media;
    // export let buttons = [];
    // export let usps = [];

    // const { currentPage } = $page?.data;

</script>

test
<!-- 
<section 
    class="hero hero-stats"
    class:vacancies={theme === 'vacancies'}
    class:home={currentPage?.name?.toLowerCase() === 'home'}
>
    <div class="container">
        <div 
            class="hero-stats-content"
            class:justify-between={theme === 'vacancies'}
        >
            {#if title}
                <h1 
                    class="hero-stats-title"
                    class:full-width={usps?.length === 0}
                >
                    {title}
                </h1>
            {/if}
            
            {#if media}
                <picture class="hero-stats-picture">
                    <svg fill="none" viewBox="0 0 125 100">
                        <g opacity=".15">
                            <path fill="#0089C4" d="M10.1668 8.12087 16.2417 0H0v16.2417h16.2417l-6.0749-8.12083ZM10.1668 91.5657l6.0749-8.2386H0v16.4772h16.2417l-6.0749-8.2386ZM10.1668 35.1904l6.0749-8.1208H0v16.2417h16.2417l-6.0749-8.1209ZM10.1668 63.9077l6.0749-8.1208H0v16.2417h16.2417l-6.0749-8.1209Z"/>
                            <path fill="#FDFEFE" d="M29.6585.00000203c-1.6294 0-3.2223.47628997-4.5771 1.36861797-1.3548.89233-2.4108 2.16063-3.0344 3.64452-.6235 1.4839-.7867 3.11674-.4688 4.69203.3179 1.57533 1.1026 3.02233 2.2547 4.15803 1.1522 1.1357 2.6202 1.9091 4.2183 2.2225 1.5981.3133 3.2546.1525 4.76-.4621 1.5054-.6147 2.7921-1.6556 3.6974-2.991.9053-1.3355 1.3884-2.90558 1.3884-4.51173.0008-1.06666-.2118-2.12301-.6255-3.10862-.4138-.98561-1.0206-1.88114-1.7858-2.63538-.7651-.75424-1.6737-1.35239-2.6735-1.760234-.9999-.407844-2.0716-.61738753-3.1537-.61663397ZM32.769 11.187h-6.2211V5.05477h6.2211V11.187ZM29.6585 83.3272c-1.6294 0-3.2223.4831-4.5771 1.3884-1.3548.9053-2.4108 2.1919-3.0344 3.6973-.6235 1.5054-.7867 3.162-.4688 4.7601.3179 1.5981 1.1026 3.0661 2.2547 4.2183 1.1522 1.1521 2.6202 1.9368 4.2183 2.2547 1.5981.3179 3.2546.1547 4.76-.4689 1.5054-.6235 2.7921-1.6795 3.6974-3.0343s1.3884-2.9477 1.3884-4.5771c.0008-1.0821-.2118-2.1538-.6255-3.1537-.4138-.9999-1.0206-1.9084-1.7858-2.6735-.7651-.7652-1.6737-1.372-2.6735-1.7858-.9999-.4137-2.0716-.6263-3.1537-.6255Zm3.1105 11.3491h-6.2211v-6.2211h6.2211v6.2211ZM29.6585 27.0696c-1.6294 0-3.2223.4763-4.5771 1.3686-1.3548.8923-2.4108 2.1606-3.0344 3.6445-.6235 1.4839-.7867 3.1168-.4688 4.6921.3179 1.5752 1.1026 3.0222 2.2547 4.158 1.1522 1.1357 2.6202 1.9091 4.2183 2.2225 1.5981.3133 3.2546.1525 4.76-.4622 1.5054-.6146 2.7921-1.6555 3.6974-2.9909.9053-1.3355 1.3884-2.9056 1.3884-4.5118.0008-1.0666-.2118-2.123-.6255-3.1086-.4138-.9856-1.0206-1.8811-1.7858-2.6354-.7651-.7542-1.6737-1.3523-2.6735-1.7602-.9999-.4078-2.0716-.6174-3.1537-.6166Zm3.1105 11.1869h-6.2211v-6.1322h6.2211v6.1322ZM29.6585 55.7869c-1.6294 0-3.2223.4763-4.5771 1.3686-1.3548.8923-2.4108 2.1606-3.0344 3.6445-.6235 1.4839-.7867 3.1167-.4688 4.692.3179 1.5753 1.1026 3.0223 2.2547 4.1581 1.1522 1.1357 2.6202 1.9091 4.2183 2.2225 1.5981.3133 3.2546.1525 4.76-.4622 1.5054-.6146 2.7921-1.6555 3.6974-2.991.9053-1.3354 1.3884-2.9055 1.3884-4.5117.0008-1.0666-.2118-2.123-.6255-3.1086-.4138-.9856-1.0206-1.8811-1.7858-2.6354-.7651-.7542-1.6737-1.3524-2.6735-1.7602-.9999-.4078-2.0716-.6174-3.1537-.6166Zm3.1105 11.1869h-6.2211v-6.1322h6.2211v6.1322Z"/>
                            <path fill="#89C4E3" d="M72.7347 0c-1.6295 0-3.2223.47629-4.5771 1.36862-1.3549.89233-2.4108 2.16063-3.0344 3.64452-.6235 1.48389-.7867 3.11674-.4688 4.69203.3179 1.57533 1.1025 3.02233 2.2547 4.15803 1.1522 1.1357 2.6202 1.9091 4.2183 2.2225 1.5981.3133 3.2546.1525 4.76-.4621 1.5054-.6147 2.7921-1.6556 3.6974-2.991.9052-1.3355 1.3884-2.90558 1.3884-4.51173 0-1.06645-.2131-2.12246-.6271-3.10773-.414-.98527-1.0209-1.8805-1.7859-2.63459-.765-.7541-1.6732-1.35227-2.6728-1.760377C74.8879.210062 73.8166 0 72.7347 0Zm3.1105 11.187h-6.2269V5.05477h6.2269V11.187ZM72.7347 27.0696c-1.6295 0-3.2223.4763-4.5771 1.3686-1.3549.8923-2.4108 2.1606-3.0344 3.6445-.6235 1.4839-.7867 3.1168-.4688 4.6921.3179 1.5752 1.1025 3.0222 2.2547 4.158 1.1522 1.1357 2.6202 1.9091 4.2183 2.2225 1.5981.3133 3.2546.1525 4.76-.4622 1.5054-.6146 2.7921-1.6555 3.6974-2.9909.9052-1.3355 1.3884-2.9056 1.3884-4.5118 0-1.0664-.2131-2.1224-.6271-3.1077-.414-.9852-1.0209-1.8805-1.7859-2.6346-.765-.7541-1.6732-1.3522-2.6728-1.7603-.9995-.4082-2.0708-.6182-3.1527-.6182Zm3.1105 11.1869h-6.2269v-6.1322h6.2269v6.1322Z"/>
                            <path fill="#fff" d="M96.5536 8.23566 102.628 0H86.3867v16.4771h16.2413l-6.0744-8.24144ZM96.5536 91.6805l6.0744-8.118H86.3867v16.2417h16.2413l-6.0744-8.1237ZM96.5536 35.3052l6.0744-8.2356H86.3867v16.4771h16.2413l-6.0744-8.2415ZM96.5536 64.1402l6.0744-8.118H86.3867V72.264h16.2413l-6.0744-8.1238Z"/>
                            <path fill="#89C4E3" d="M115.834.00003237c-1.63-.00453671-3.225.46789363-4.583 1.35745763-1.358.88957-2.418 2.15628-3.045 3.63977-.627 1.48348-.793 3.11705-.478 4.69385.315 1.57679 1.098 3.02589 2.249 4.16399 1.151 1.138 2.619 1.9137 4.218 2.2289 1.599.3152 3.257.1557 4.763-.4582 1.507-.614 2.795-1.6549 3.701-2.9908.907-1.336 1.391-2.90697 1.391-4.5141.001-2.15028-.863-4.21328-2.404-5.7359-1.54-1.522631-3.63-2.38041248-5.812-2.38496763ZM118.945 11.187h-6.221V5.0548h6.221v6.1322ZM115.834 83.3272c-1.63-.0046-3.225.4747-4.583 1.3771-1.358.9025-2.418 2.1875-3.045 3.6925-.627 1.505-.793 3.1623-.478 4.7619.315 1.5997 1.098 3.0698 2.249 4.2243 1.151 1.1545 2.619 1.9415 4.218 2.2613 1.599.3197 3.257.1579 4.763-.4649 1.507-.6229 2.795-1.6788 3.701-3.0341.907-1.3554 1.391-2.9491 1.391-4.5796.001-2.1814-.863-4.2743-2.404-5.819-1.54-1.5447-3.63-2.4149-5.812-2.4195Zm3.111 11.3491h-6.221v-6.2211h6.221v6.2211ZM115.834 27.0696c-1.63-.0045-3.225.4679-4.583 1.3575-1.358.8895-2.418 2.1562-3.045 3.6397-.627 1.4835-.793 3.1171-.478 4.6939.315 1.5768 1.098 3.0259 2.249 4.1639s2.619 1.9138 4.218 2.229c1.599.3152 3.257.1557 4.763-.4583 1.507-.6139 2.795-1.6548 3.701-2.9907.907-1.336 1.391-2.907 1.391-4.5141.001-2.1503-.863-4.2133-2.404-5.7359-1.54-1.5227-3.63-2.3804-5.812-2.385Zm3.111 11.187h-6.221v-6.1322h6.221v6.1322ZM115.834 55.7869c-1.63-.0045-3.225.4679-4.583 1.3575-1.358.8895-2.418 2.1562-3.045 3.6397-.627 1.4835-.793 3.1171-.478 4.6939.315 1.5768 1.098 3.0259 2.249 4.1639s2.619 1.9138 4.218 2.229c1.599.3152 3.257.1557 4.763-.4583 1.507-.6139 2.795-1.6548 3.701-2.9907.907-1.336 1.391-2.907 1.391-4.5141.001-2.1503-.863-4.2133-2.404-5.7359-1.54-1.5227-3.63-2.3804-5.812-2.385Zm3.111 11.187h-6.221v-6.1322h6.221v6.1322Z"/>
                            <path fill="#0089C4" d="M53.2394 8.12087 59.3179 0H43.0762v10.9635h3.9301V3.92575h4.4743l-3.1223 4.19512 3.1223 4.19513h-8.4044v3.9257h16.2417l-6.0785-8.12083ZM53.2394 91.5657l6.0785-8.2386H43.0762v11.1224h3.9301v-7.1397h4.4743l-3.1223 4.2559 3.1223 4.2559h-8.4044v3.9827h16.2417l-6.0785-8.2386ZM53.2394 35.1904l6.0785-8.1208H43.0762V38.033h3.9301v-7.0377h4.4743l-3.1223 4.1951 3.1223 4.1952h-8.4044v3.9257h16.2417l-6.0785-8.1209ZM53.2394 63.9077l6.0785-8.1208H43.0762v10.9634h3.9301v-7.0377h4.4743l-3.1223 4.1951 3.1223 4.1951h-8.4044v3.9258h16.2417l-6.0785-8.1209Z"/>
                        </g>
                    </svg>
                    
                    <img
                        src="{media}?quality=90&height=395&width=1072&format=webp" 
                        alt={title}
                        class="hero-stats-picture-image"
                    />
                </picture>
            {/if}

            {#if usps?.length > 0}
                <div class="hero-stats-usp-list">
                    {#each usps as {number, uspText}}
                        <div class="flex flex-col">
                            {#if number}
                                <p class="usp-number">
                                    {number} <span>+</span>
                                </p>
                            {/if}
                            
                            {#if uspText}
                                <p class="usp-title">
                                    {uspText}
                                </p>
                            {/if}
                        </div>
                    {/each}
                </div>
            {/if}

            {#if buttons}
                <div class="hero-stats-button-list">
                    {#each buttons as {buttonText, buttonUrl, variant}}
                        <a
                            href={buttonUrl}
                            class="button {variant} full"
                        >
                            {buttonText}
                        </a>
                    {/each}
                </div>
            {/if}
        </div>
    </div>
</section> -->

Now i get the same error if i want to “unpublish” a page.

Hello @splat46,

Would you be able to share the page URL or builder content link where we can reproduce this issue?

Additionally, if the UI is not allowing you to delete the content, then you can try our write API to manually delete content using curl command

curl https://builder.io/api/v1/write/MODEL_NAME/ENTRY_ID \
  -X DELETE \
  -H 'Authorization: Bearer YOUR_PRIVATE_KEY'

# Example response
# {
#  "message": "Success"
# }

Thanks for your reply. The url is: Builder.io: Visual Development Platform

Is this where you looking for?

This is the published page where the component is visible:
https://blauwemonsters-www.vercel.app/werkwijze

Was there any custom fields removed from the model? or any custom component added?

I am able to reproduce the issue, and if you want, I can go ahead and delete the content, however, I’m not able to reproduce similar error on our end.

I commented out the fields. If you able can you remove the conent of the following pages:

and

Do you want us to remove the entire page or just its contents?

The entire page is also fine, I will recreate it :slight_smile:

Hello @splat46,

As requested, both the contents are deleted now and you can recreate them.

Thanks,

Awesome, thank you! For some reason the component is working now.

1 Like