Repeat steps disappear from steps in server actions

OS info

  • Operating System : Windows 10.0.19042
  • Wappler Version : 3.9.7

Problem description

Repeat steps disappear from steps in server actions. I’m trying to figure out some server actions with custom php files (using FPDF). However, every now and then, the steps from within my repeat just totally disappear in the steps overview, and I can’t edit them with the interface anymore. Inspecting a php file where this occurs doesn’t bring up any specific things. Two action files both with repeats steps look totally the same in VSCode, but not in the Wappler interface.

Steps to reproduce

  1. work with action file and fiddle around because you don’t know exactly how to use FPDF to create a batch of personalized pdf’s with dynamic data from your database
  2. use repeat to do some stuff for every row in your database query
  3. find out after a while that your repeat steps are gone
  4. I attached two files in a zip. The file called create_multiple_pdf_copy.php has the steps visible in Wappler. The file called create_multiple_pdf_copy_copy.php has no steps visible in the repeat on my Wappler instance.

pdf_creation.zip (3.3 KB)

Any help is greatly appreciated.
ps: any advice on how to create a pdf for each row in my database using FPDF is also very welcome (I think I am almost there in the called create_multiple_pdf_copy_copy.php. I use this to open a custom php file that has the FPDF instructions to create the pdf. It works, but only for one row. Once I query more than one it doesn’t seem to create multiple files. (file names for created pdf’s in the FPDF php file are dynamically set to some name in the database rows).

Hi @jellederijke,

I am interested in learning about this as well. I would recommend changing the topic title to something more descriptive to get more of a response. :slight_smile:

Thanks, @scott! Now updated

I have now ran into this issue repeatedly, using a repeat :joy:

I can now exactly replicate the issue by going through these steps:
1: create API action ‘create_pdf_test_2’
step1

2:add database paged query with limit 2 as step:

3:add repeat and fill in data from paged query as expression

4: add set session some_name to repeat steps

5: add include server action step to repeat and select ‘fpdf_wappler_test_101’ from library. note: I added fpdf183 as a folder in the library to be able to use fpdf in the server actions. I’n not sure if this is the right way to go, it is the way I found. I added the file fpdf_wappler_test_101 php file as zip to this post.



fpdf_wappler_test_101.zip (899 Bytes)

6: save server action and open in browser

7: get some error in browser. Despite error I do also get a generated pdf. Just one however, not 2 as to be expected since I have a paged query with a limit of 2 rows.


8: get back into Wappler to fiddle along, only to find out the repeat steps have gone!

I can’t seem to add another repeat, as I get the message ‘You need to enter at least one step!’

Any help is greatly appreciated.

PS: once I get this FPDF running the way I need to (and understand how to use FPDF with Wappler much better), I plan on publishing an elaborate tutorial on how to create pdfs in Wappler to share with the community.

For any future user that needs an answer on how to use FPDf, see this thread:

Strange bug with repeats disappearing still exists.