Error installing a block
Permalink{"message":null,"title":null,"time":"2014-09-29 10:43:46","redirectURL":"http:\/\/mydomain.com\/index.php\/team"}
When I go back to the page the block is all installed and working, and if I add additional blocks of the same type the error does not happen. I don't think it has anything to do with my blocks db table, I don't use 'table' or 'time' anywhere.
Thanks
Has anyone seen an error like this or know where it is coming from?
SEE ATTACHEMENTS in my previous post (below)
I'm sure it's in my code, but If I add my block and click publish it shows the same error you got. But, if i refresh the page before publishing, it works fine.
Error: {"message":null,"title":null,"time":"2015-08-14 14:19:36","redirectURL":"http:\/\/localhost\/index.php\/art-market","pages":[{"name":null,"cID":null}]}
The attached images show the page in edit mode before and after doing a page refresh. Seems like Concrete5 is not placing the block inside the block area at first.
NOTE: This is on the latest 5.7.5 version, but it's been happening (with only my blocks) since i started developing in the 5.7 platform (about 3 months).
{"message":null,"title":null,"time":"2015-12-02 20:21:52","redirectURL":"http:\/\/localhost\/concrete5.7.5.3\/index.php\/members\/profile","pages":[{"name":null,"cID":null}]}
I tried uninstalling the package, clearing cache, reinstalling the package and the block... same problem.
NOTE:
If I install the block, refresh the page before clicking publish, no error massage!
I then noticed, the page does not actually place the block into the page area, but puts it BELOW the page area. Then correctly places the block when the page is refreshed. (See attached). After this refresh, I can Publish Changes without error.
ALSO:
If i install the block, and it looks like it did not install correctly. I tried to "Discard Changes" and still got the error!?!?
FINALLY:
When the block installs below the selected area, I can drag it up to the correct area, but publishing that page, still produces the error:
I needed to pass variables to view.js file, so I set them in a script block (in the view.php)... Problem was, during block install the view.js is opened BEFORE the view.php is.
To fix the problem, I had to check for missing elements on the page before running the scripts.
I think we should be able to do this from view() now, but I kept getting that funny error message when adding a block the first time to a page. The rest of the time it all worked fine. I don't know if there is something buggy or if I am doing this wrong in a controller, or is there a new way to do it now? Injecting CSS like that works fine, just seems to be with javascript.
thanks