rainlab/builder-plugin

[PHP 8.0] Created Model Not Showing

KalynDavis opened this issue · 9 comments

After creating a model and verifying it within the filesystem, the model does not show up in the UI. I attempted to debug it and was only able to conclude that the object DirectoryIterator($modelsDirectoryPath) is returning a directory instead of a file within the foreach loop as the isFile condition fails.

Can you provide more detail, what is the name of the model? Some step-by-step instructions would be useful for us to test this. Thanks!

Hi Sir,
I have installed the Builder plugin in OctoberCMS and then I create a plugin name Client which is used to store the client companies logo or images. After creating the plugin, I can create a database table from builder database side menu. But after creating the model from builder side menu, it doesn't show anything. While i try to create same name model, show an error that this model already exists.
image-1
image-2
image-3
Above I share the images. Please check and give me the solution.

Please try renaming your plugin from client to Client (with a capital C)

Thanks Sir for replying on my issue. At last I figure out my issue. Its not related to the OctoberCMS, it related to the PHP version. I had install > 8.0 version. Now I remove that PHP version and install 7.3 version PHP and the problem is solved.

To add on this issue. When using PHP 8.0.3 and creating a model, the browser console (in Chrome) shows an error: POST http://localhost/backend/rainlab/builder 406 (Not Acceptable)

Edit: When creating the model in PHP 8.0.3 and getting the error, and than switching to PHP 7.4.2 the model now does show up in the Builder plugin.

Thanks for the feedback. I did not notice that you were using PHP 8. The builder plugin is yet to support this version of PHP. We will address it soon

Getting the same issue with php 7.2.34. The model exists but is not showing. Backend is showing me the same error as https://user-images.githubusercontent.com/73809634/113862171-b4a51000-97c5-11eb-8d41-ef68115d594b.png the last image above

I had to end up renaming my Model if that helps anyone that comes across something similar

If this is still an issue, please send us an email if with step by step instructions on how to replicate it.