Bug Report #1643829462558

OS info

  • Operating System : Mac OS 11.6.3
  • Wappler Version : 4.5.1

Problem description

Make an edit and the fans start to rev, wappler freezes, error count at the bottom of the view continually keeps rising and has to be force quit. Unusable at this point.

Steps to reproduce

  1. Edit a file in either code or design viewreport1643829462558.zip (183.1 KB)

Is it just on a specific file maybe? I have the same set up and it’s working with no issues at all.

So you have a page that produces tons of javascript errors? Maybe try to see what errors are those open the bottom error panel or in the browser and check the dev tools for errors.

Usually there is something very wrong with the page - not really wappler’s fault.

Ok, I’ll investigate further. So far two different include pages have done it and the index page. Thanks for the quick replies guys!

Think it has to do with a particular include file where I have a lot of <?php echo $something;?> code inside the double quotes of various dmx-bind: attributes. They work fine on the page in the browser, but perhaps the editor doesn’t like it, cause I’m getting a lot of Lexor and Unexpected Token errors in the editor that I’m not getting the browser console. Probably due to the fact that it doesn’t parse the php now that I think of it. Seems any other page/include that I have this particular include file on, are having the issue I posted here. :pensive:

Thanks for pointing me in the right direction guys.

Looks like as long as I turn off app connect mode before the errors start climbing, I can work and save.

Thanks again, guys. Love this app and community.

Could you add the exact code causing the problem? Normally php code should be just ignored in design view.

It would be a lot to go through the whole page, but here is an example of one of the attributes throwing an error.

dmx-bind:value="<?php echo $full_path_to_crud_input;?>.value != 'add_for' || (<?php echo $full_path_to_crud_input;?>.value == 'add_for' &amp;&amp; !<?php echo $make_id_tag_unique;?>var_autocomplete_complete_last_<?php echo $id_column;?>.value) ? <?php if ($field_type == 'cases'){?>(query.caseid ? query.caseid : (<?php echo $form_data_path_to_columns_with_trailing_period;?><?php echo $id_column;?> != 0 ? <?php echo $form_data_path_to_columns_with_trailing_period;?><?php echo $id_column;?> : ''))<?php }//if ($field_type == 'cases'){?><?php if ($field_type != 'contacts' && $field_type != 'cases'){?>(<?php echo $form_data_path_to_columns_with_trailing_period;?><?php echo $id_column;?> != 0 ? <?php echo $form_data_path_to_columns_with_trailing_period;?><?php echo $id_column;?> : '')
<?php }//if ($field_type == 'cases'){?><?php if ($field_type == 'contacts'){?>(((<?php echo $form_data_path_to_columns_with_trailing_period;?><?php echo $id_column;?> && <?php echo $form_data_path_to_columns_with_trailing_period;?><?php echo $id_column;?>.toNumber() == <?php echo $form_data_path_to_columns_with_trailing_period;?><?php echo $id_column;?> ? 0 : 1 ) || <?php echo $form_data_path_to_columns_with_trailing_period;?><?php echo $id_column;?> == 0) ? '' : <?php echo $form_data_path_to_columns_with_trailing_period;?><?php echo $id_column;?>)<?php }//if ($field_type == 'contacts'){?> : <?php echo $make_id_tag_unique;?>var_autocomplete_complete_last_<?php echo $id_column;?>.value"

Here is the error it’s throwing. Perhaps I’m missing a parenthesis or something but I’m not seeing it.

You get the error because the design view in Wappler doesn’t run PHP, so it gets an invalid expression there. The many errors it is throwing freezes Wappler, we will have that fixed in upcoming Wappler update.

Awesome. Thank you @Patrick. Glad to know it wasn’t my code. :slightly_smiling_face:

Fixed in Wappler 4.5.2

@Teodor, unfortunately it is still doing the same thing.

Well we improved that having thousands of errors not easily crash Wappler and display more nicely.

But having so much errors is fundamentally wrong - so if you really insist in building your data expressions with PHP, then you will have to switch app connect off in design view.

I would suggest not to use PHP in App Connect expressions - those are for client side and should be valid.

So you might want to rethink your logic or as I said switch App Connect off.

Thank you @George, when I wrote this custom lookup field, I was an old school PHP hand coder new to Wappler and would revert to PHP when I couldn’t figure out what I needed to quickly with the interface. When I get some time, I am going too look into trying to rewrite it the more “Wappler” way now that I’m more familiar with the software.

This topic was automatically closed after 46 hours. New replies are no longer allowed.