Content SC does not fetch data

Wappler Version : v6.8.0
Operating System : Windows 11
Server Model: Docker (Localhost)
Database Type: MariaDB

Data that was fetched before the Wappler update is not fetched now. The entire page related to this is not working.


cn2
Thanks in advance for your help

Hi,

You need to make a slightly better bug report:

  1. Show developer tools browser console screenshot (to look for errors or warnings)
  2. Show developers tools network tab (to see if the SC is giving an HTTP error code)

Without these your bug report is like saying "my car broke down, here's a photo of the engine, how do I fix it?" :red_car:

I know you tried to make it useful by posting the screenshots, the problem is I think the screenshots you posted don't make it easier to diagnose the problem :slight_smile:

You’re right. There are no errors at backend, I just don’t see my datas on the page (frontend). That’s why I didn’t send them :slightly_smiling_face: everthing seems fine

Well, is the SC connection successful? Does it return a JSON with your data? It's just the front-end not rendering?

All my server connects return code 200 (with data).

cn1

It should be like this (In the version that should work, data comes with html elements.)

This is what happens. (Currently, data and html elements cannot be displayed in the version of Wappler that I have updated and run on localhost. Working version is now live)

I cannot see any data on this page, from which I received dynamic data.

I'm sorry, I don't understand the screenshots. Maybe someone will

1 Like

Thanks for your efforts. Maybe I couldn't explain it correctly. I edited the last post to make it a little more understandable

I checked the update files coming to Wappler and found the files that were causing problems on my website. I would appreciate it if you could send me update notes regarding these or tell me what I should do.
10 - designer sol kisim patladi
14 - 3d patladi

Sorry i tried to understand from your posts what is the issue you are having, but i don't really understand.
Can you please explain where exactly is the issue?

Hello,

This is an image of the page working as it should

This is the final version of the page with Wappler updates

This is the console of the running page (no errors, server connects are working, all html elements appear on the page)

This is the console of the page that is not working (there is an error, server connects are working, some html elements do not appear on the page)

This is the code block where I have the env selected.


When I discard the Wappler upgrade files from github, this page works as before. I discarded them one by one and saw that the files I showed above affected the page.

But this clearly shows an error with some custom script, nothing Wappler related in the error message.
Check your custom code.

Wappler that has not been updated with the same code does not give an error. In the pictures I sent, only Wappler was updated. No relevant code blocks have been changed. As I said above, the problem is solved when I discard the updates from github.

But this doesn't mean there's a bug in Wappler.
It's some custom code you're using, so i suggest you to review your code.

The error is happening because the dmx.parse is returning undefined

The custom code you refer is on the screenshot, that's how I made the deduction

What can I change if my code works fine in the unupdated version of Wappler but does not work properly in the updated version? I did not change any code related to this page.

When I change it manually in this way, I do not receive any error messages, but my page still does not work properly. (Which was working in the old Wappler version) As you can see, I obtain the data in custom js with some dmx codes used in Wappler.

So which part of this code does not work for you?
Also please paste the code directly here instead of screenshots.

var envSort = dmx.parse('content.activeDesignData.data.environment_sort');

This part doesn't work in my custom.js. However, some html elements already written in designer.ejs (the displayed page) do not appear on the page at all.

page not working

working page

This code works perfectly fine and i already tested this. You can test it via consoe.log

I am not sure what to look in your screenshots and i don't understand what are these elements that do not appear and how do you add them.

This is true. However, in the old version, I did not receive this error and my page was working properly. I haven't changed any code affecting this page. Only Wappler has been updated.

<div id="partContainer" is="dmx-form-repeat" dmx-bind:items="(activeDesignData.data.part.where(`category_id`, category_id, '==')).sort(design_part_sort)" sortable="true" dmx-on:end="run([{wait:{delay:1000}},{run:{action:`accordion1_collapseOne.frmPartList.submit()`}}])" animation="500" handle=".drag">


                                        <div class="d-flex drag flex-column" id="partListContainer">
                                            <input id="inp_part_price" name="inp_part_price" type="text" class="form-control visually-hidden price" dmx-bind:value="((model_base_price+(property.values(`property_price`).sum()))*local1.data.currency_exchange_rate)">
                                            <input id="inp_part_price_usd" name="design_part_price" type="text" class="form-control visually-hidden price" dmx-bind:value="((model_base_price+(property.values(`property_price`).sum()))*local1.data.currency_exchange_rate)" dmx-on:changed="">
                                            <input id="inp_part_weight" name="inp_part_weight" type="number" class="form-control visually-hidden price" dmx-bind:value="((category_id == 10)?((property.where(`property_json_key`, 'body_top_wood', '==')).count()&gt;0)?((model_weight_factor.split(',')[0])*((property.where(`property_json_key`, 'body_top_wood', '=='))[0].property_weight) )+((model_weight_factor.split(',')[1])*((property.where(`property_json_key`, 'body_back_wood', '=='))[0].property_weight) )+varHardwareWeightBody.value:((model_weight_factor.split(',')[2])*((property.where(`property_json_key`, 'body_back_wood', '=='))[0].property_weight))+varHardwareWeightBody.value:(category_id == 11)?(((property.where(`property_json_key`, 'headstock_type', '=='))[0].property_weight)*((property.where(`property_json_key`, 'neck_wood_back', '=='))[0].property_weight))+varFretboardWeightFactor.value*((property.where(`property_json_key`, 'neck_fretboard_wood', '=='))[0].property_weight)+varHardwareWeightNeck.value:property.values(`property_weight`).sum() )" dmx-class:selected-part-weight="design_part_selected==1" dmx-on:updated="run({runJS:{function:'totalWeight'}})"><input id="inp_design_part_id" name="inp_design_part_id" type="text" class="form-control visually-hidden" dmx-bind:value="design_part_id">
                                            <input id="inp_design_part_sort" name="inp_design_part_sort" type="number" class="form-control visually-hidden" dmx-bind:value="$index">
                                            <div class="d-flex flex-column pointer" dmx-class:bg-mid-grey="design_part_status==1||design_part_status==0" dmx-on:click="run([{run:{action:`togglePropertySelectMenu.check();toggleModelMenu.uncheck();togglePropertyDetailMenu.uncheck()`}},{condition:{if:`(design_part_status!=1&amp;&amp;varActivePartCategory.value==category_id)||(design_part_selected!=1)`,then:{steps:{run:{action:`toggleUpdateDesigner.check()`}}}}},{run:{action:`srvUpdatePartStatus.load({user_id: varUserId.value, design_part_id: design_part_id, category_id: category_id, design_id: design_id});varActivePartCategory.setValue(category_id)`}}])">

                                                <div class="d-flex mt-2 mb-0 ms-3 me-3 justify-content-between align-items-start">
                                                    <button id="btnPartEye" dmx-bind:id="'btnPartEye' + $index" class="btn text-start ms-0 me-0 pt-0 pb-0 ps-0 pe-0" dmx-bind:value="design_part_selected" dmx-on:click.stop="" dmx-style:top="'-3px'" dmx-style:position="'relative'"><i class="fa-eye fa-solid f-12 eye" dmx-style:width="'20px'" dmx-class:eye-active="btnPartEye.value=='1'"></i></button>
                                                    <p class="f-11 text-light fw-bolder lh-sm flex-grow-1 mt-1 mb-1 ms-0 ps-0" dmx-style:position="'relative'" dmx-text="design_part_name">NEW BODY</p>
                                                    <div class="d-flex justify-content-end" dmx-hide="toggleViewOnly.checked">
                                                        <button id="btnPartActions" dmx-bind:id="'btnPartActions'+category_name+$index" class="btn text-primary text-primary-hover text-center mt-0 mb-0 ms-0 me-0 pt-0 pb-0 ps-0 pe-0" dmx-on:click.stop="run([{run:{action:`toggleModelMenu.uncheck();togglePropertySelectMenu.uncheck()`}},{runJS:{function:'outsideClick',args:[`\'partActionsContainer\'+category_name+$index`,`\'btnPartActions\'+category_name+$index`]}}])"><i class="fa-regular fa-bars" dmx-style:width="'20px'"></i></button><button dmx-bind:id="'btnCartPart'+category_name+$index" class="btn text-end mt-0 mb-0 ms-0 me-0 pt-0 pb-0 ps-0 pe-0" dmx-style:width="'25px'" dmx-on:click.stop="run([{runJS:{function:'cartButtonToggle',args:[`\'btnCartPart\'+category_name+$index`,`design_part_cart`]}},{serverConnect:{url:'/api/designer/updatePartCart',site:'Dev Shark',params:{user_id:`varUserId.value`,design_part_id:`design_part_id`,design_part_cart:`design_part_cart==0?1:0`,design_id:`design_id`},name:'scUpdatePartCart'}}])" dmx-class:grey-cart="design_part_cart==0" dmx-class:green-cart="design_part_cart==1" id="btnCartGreen"><i class="fa-regular fa-flip-horizontal fa-cart-shopping cart-icon f-14" dmx-style:position="'relative'" dmx-style:top="'-1px'" localized=""></i></button>
                                                    </div>
                                                </div>
                                                <div class="d-flex justify-content-start mt-0 mb-2 ms-3 me-3">

                                                    <p class="f-11 text-primary lh-1 mb-0 fw-bolder price" dmx-style:margin-left="'22px'" dmx-text="((model_base_price+(property.values(`property_price`).sum()))*local1.data.currency_exchange_rate).formatNumber(0, ',', '.')+(local1.data.currencyName == &quot;EUR&quot; ? ' EUR' : local1.data.currencyName == &quot;USD&quot; ? ' USD' : ' TL')" id="partPrice">800 USD</p>
                                                    <p class="f-11 lh-1 fw-bolder mb-0 text-primary" dmx-style:margin-left="'22px'" dmx-text="((category_id == 10)?((property.where(`property_json_key`, 'body_top_wood', '==')).count()&gt;0)?((model_weight_factor.split(',')[0])*((property.where(`property_json_key`, 'body_top_wood', '=='))[0].property_weight) )+((model_weight_factor.split(',')[1])*((property.where(`property_json_key`, 'body_back_wood', '=='))[0].property_weight) )+varHardwareWeightBody.value:((model_weight_factor.split(',')[2])*((property.where(`property_json_key`, 'body_back_wood', '=='))[0].property_weight))+varHardwareWeightBody.value:(category_id == 11)?(((property.where(`property_json_key`, 'headstock_type', '=='))[0].property_weight)*((property.where(`property_json_key`, 'neck_wood_back', '=='))[0].property_weight))+varFretboardWeightFactor.value*((property.where(`property_json_key`, 'neck_fretboard_wood', '=='))[0].property_weight)+varHardwareWeightNeck.value:property.values(`property_weight`).sum() ).formatNumber(0, ',', '.')+' gr / '+(((category_id == 10)?((property.where(`property_json_key`, 'body_top_wood', '==')).count()&gt;0)?((model_weight_factor.split(',')[0])*((property.where(`property_json_key`, 'body_top_wood', '=='))[0].property_weight) )+((model_weight_factor.split(',')[1])*((property.where(`property_json_key`, 'body_back_wood', '=='))[0].property_weight) )+varHardwareWeightBody.value:((model_weight_factor.split(',')[2])*((property.where(`property_json_key`, 'body_back_wood', '=='))[0].property_weight))+varHardwareWeightBody.value:(category_id == 11)?(((property.where(`property_json_key`, 'headstock_type', '=='))[0].property_weight)*((property.where(`property_json_key`, 'neck_wood_back', '=='))[0].property_weight))+varFretboardWeightFactor.value*((property.where(`property_json_key`, 'neck_fretboard_wood', '=='))[0].property_weight)+varHardwareWeightNeck.value:property.values(`property_weight`).sum() )/453.6).formatNumber(2, '.', ',')+' lbs'" id="partWeight">800 USD</p>
                                                </div>
                                                <div class="d-flex justify-content-start align-items-center mt-0 mb-2 ms-3 me-3" is="dmx-if" id="crCites" dmx-bind:condition="(property.where(`property_cites_required`, 1, '==')).count()&gt;0">

                                                    <p class="f-11 lh-1 mb-0 fw-bolder price text-success" dmx-style:margin-left="'22px'" id="cites">CITES CERTIFICATED</p>
                                                    <button id="btnCitesInfo" class="btn flex-shrink-1 pt-0 pb-0 f-12" dmx-show="varUserId.value==1" dmx-on:click.stop="modalCites.show()"><i class="fa-solid fa-circle-info" style="color:#c5a47e;"></i></button>
                                                </div>
                                            </div>
                                            <div class="d-flex flex-column" id="partActionsContainer" dmx-bind:id="'partActionsContainer'+category_name+$index" dmx-style:display.important="'none'">
                                                <div class="d-flex flex-column mb-0 ms-0 me-0">
                                                    <button id="btnDuplicatePart" class="btn f-10 w-100 text-start text-white fw-bold ms-0 pt-1 pb-1 btn-success" dmx-style:padding-left="'37px'" dmx-on:click="srvDuplicatePart.load({user_id: varUserId.value, design_part_id: design_part_id});toggleUpdateDesigner.check()">DUPLICATE</button><button id="btnDeletePart" class="btn  f-10 w-100 text-start text-white fw-bold ms-0 pt-1 pb-1 btn-danger" dmx-style:padding-left="'37px'" dmx-on:click="run({'bootbox.confirm':{message:'The part will be deleted permanently. Do you confirm?',title:'DELETE PART',buttons:{confirm:{label:'DELETE',className:'btn-danger'},cancel:{label:'CANCEL',className:'btn-dark'}},swapButtonOrder:true,then:{steps:[{run:{action:`toggleUpdateDesigner.check()`}},{runJS:{function:'deletePart',args:[`category_id`]}},{run:{action:`srvDeletePart.load({user_id: srvUserInfo.data.userInfo.user_id, part_id: design_part_id, category_id: category_id, design_id: design_id, design_part_selected: design_part_selected, design_part_status: design_part_status})`}}]}}})">DELETE</button>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

This is some of the code that should work. I have no serverconnect errors