NO BUG: Custom element not loading/dissapears/"doesn't exist"

Browser: Brave
OS: Windows

I am not sure what is going on or what to do or how to troubleshoot this further.
I made here a screen recording of the issue:

  • I followed the documentation and created a custom element “custom-element.php” that was working perfectly
  • It works, shows up in the editor, I customize it, use it, it loads up on the front end as expected.
  • I customize it for a while, then it starts saying “custom element doesn’t exist” on the Bricks Editor and stops showing up in the elements panel.
  • I assume I must have broken the code, so revert the changes back to a working code but it doesn’t fix it. it still says “custom element doesn’t exist”.
  • No matter what I do, it always says “custom element doesn’t exist”
  • I create a brand new element with a different name “custom-element-2.php”
  • Copy paste the code exactly from “custom-element.php” to “custom-element-2.php” only updating the name.
  • This fixes the issue and now the code works.
  • After some time ( some 48h ) as I return to work back on it, it’s saying “custom-element-2 doesn’t exist”.
  • I copy paste the code again into “custom-element-3.php” and now it works again.

I’m really not sure what is going on, it’s like Bricks remembers the name of the custom element that stops working, even if it has working code, and it chooses to never load it again?

Not sure if it matters but I’m using Filezilla to access the server files and then editing them with notepad (although I code with notepad++).

Hi Jaime,
Thanks so much for your report!

Unfortunately, I cannot reproduce the issue. Please send temporary login credentials and a link to this thread to using the email address you used during the purchase.

Best regards,

Thanks @timmse !
I have just sent the email but meanwhile I think I have found out what could be going wrong,
After trying to edit the files through wordpress Theme Editor I noticed most of my custom-element.php files are empty here.
And also have a

" You need to make this file writable before you can save your changes. See Changing File Permissions for more information."

The thing is, I have accessed through Filezilla and gave all permissions to the files (777) even applied it to the main “bricks-child” theme folder file and to all subdirectories and files, but for some reason it still doesn’t work?

Although after knowing this, for new files “custom-element.php” I have created,
I have immidiately went ahead and changed their file permissions to 777
and those are now editable through the wordpress control panel in the Theme Editor menu, so I’m not sure if this might have fixed it, but if it has fixed (and it won’t automatically somehow revert back or stop working like it was happening previously) I will update the thread here!

The same issue happened :frowning:
Today I get to my custom.php element files looking at them from the wordpress dashboard in the “theme editor” menu, and they are all empty with the message
" You need to make this file writable before you can save your changes. See Changing File Permissions for more information."

Upon checking file permissions with Filezilla they did change somehow automatically from 777 to 644

I don’t get how.
The thing is, changing it manually back to 777 and adding all permissions does not fix the issue. Even after saving the file again with the code in it, it still displays as empty from the wordpress theme editor dashboard :upside_down_face:

Hi @jcmatoskx,

I just logged in to your site and can confirm that you still have a permissions issue with the elements directory. This isn’t a bug with Bricks but a file permissions problem. I’ll get in touch with you over email to help direct you in the right direction.