Modifying a core block (Form)
Permalink
Hi all,
I'm modifying the core form block to add the uploaded file as attachment in the notification email (v5.6.0.1).
I need to add an option in the form block setup to enable/disable this function and I'm stuck here.
I've modified the block UI to add a checkbox (/concrete/blocks/form/form_setup_html.php), the db definition with the new field and updated the schema version (/concrete/blocks.form/db.xml), then I have modified the controller to save data(/concrete/code/controller/blocks/form.php). I have also added the column in the database table.
The issue is that I can't see my UI modification when replacing these modified files in my C5 installation. The system seems to have kept in memory the previous version. Any idea to make my changes visible ?
Note that I don't want to use the override method to place the files in other dirs as I would like to test them like "core" components.
Regards,
I'm modifying the core form block to add the uploaded file as attachment in the notification email (v5.6.0.1).
I need to add an option in the form block setup to enable/disable this function and I'm stuck here.
I've modified the block UI to add a checkbox (/concrete/blocks/form/form_setup_html.php), the db definition with the new field and updated the schema version (/concrete/blocks.form/db.xml), then I have modified the controller to save data(/concrete/code/controller/blocks/form.php). I have also added the column in the database table.
The issue is that I can't see my UI modification when replacing these modified files in my C5 installation. The system seems to have kept in memory the previous version. Any idea to make my changes visible ?
Note that I don't want to use the override method to place the files in other dirs as I would like to test them like "core" components.
Regards,
In my experience from modifying blocks, this is usually caused by the override cache. You can try turning it off and clearing your cache. Hope that helps!
Hi DAkers,
Sorry I forgot to mention in my post that all caches are turned off and that I've purged several times the cache.
Rgds
Sorry I forgot to mention in my post that all caches are turned off and that I've purged several times the cache.
Rgds
If these changes are being applied directly to the core block files, you may need to refresh the block as well.
Go to
Dashboard -> Under Blocks & Stacks select "Block Types" - > Find the block you are modifying, click it and select "refresh".
Hope that solves it!
Go to
Dashboard -> Under Blocks & Stacks select "Block Types" - > Find the block you are modifying, click it and select "refresh".
Hope that solves it!
Hi DAkers,
Thank you for your help, you put me on the right way! I refreshed the block but it did not seem to activate my code (repurged the cache to be sure). Then I search for files on the filesystem and found occurrences under the 'update' dir. I copied my files here then refreshed once again and it seems to fix the issue.
I don't know if it's the academic way to go but it seems to work.
Kindest,
Thank you for your help, you put me on the right way! I refreshed the block but it did not seem to activate my code (repurged the cache to be sure). Then I search for files on the filesystem and found occurrences under the 'update' dir. I copied my files here then refreshed once again and it seems to fix the issue.
I don't know if it's the academic way to go but it seems to work.
Kindest,
No problem at all. Glad you got it working.