I have a component using Laravel livewire which disappear please help me how can i resolve that thank u.
please check this error
https://flareapp.io/share/DPyDBeDm
\app\Http\Livewire\Messaging.php
public function render()
{
return view('livewire.messaging');
}
Related
EmberJS 3.4
I'm loading a Project entity from a backend which takes a couple of seconds. Now I would like to show a spinner during loading.
as described I created a project-loading.hbs (also tried with loading.hbs) https://guides.emberjs.com/release/routing/loading-and-error-substates/
project model class:
export default AuthenticatedRoute.extend({
model(params) {
return this.store.findRecord("project", params.projectname);
},
actions: {
refresh: function() {
this.refresh();
}
}
});
though it takes time to load the entity, the loading template seems not to be rendered/shown. Am I doing something wrong ?
For a route called project (routes/project.js), the loading template should be called project-loading.hbs.
I cloned your project and actually made it work (Ember CLI 3.4.3) by adding templates/project-loading.hbs, adding a sleep(30) call to your /api/projects/:name endpoint and going to a URL like http://localhost:4200/projects/hallo.
Do you have the problem when transitioning to the route internally (by using transitionTo or the {{link-to}} helper with a model for instance) or by entering the URL manually? Note that model hook is not executed when you transition to a route and pass in a model context (see https://guides.emberjs.com/v3.4.0/routing/specifying-a-routes-model/).
I ended up with adding the following code to the application adapter:
// not very ember way of doing this, but quite simple :)
$(document).ajaxStart(() => {
$('#spinner').removeClass('hide');
});
$(document).ajaxStop(() => {
$('#spinner').addClass('hide');
});
I really would prefer doing it the ember way. for now, this seems to do the trick.
for anyone interested, here's the complete project: https://github.com/puzzle/mailbox-watcher/tree/master/frontend
I am creating a controller and inheriting GlassController, I am trying to call controller action method using ajax and the URL requested is '/api/sitecore/TestForms/TestFormsAPI' and it throws an exception saying "The controller for path '/api/sitecore/TestForms/TestFormsAPI' was not found or does not implement IController."
Attached are the screen shot of my code and exception:
Can anyone suggest what could be the issue?
Sitecore has a different way of routing. This may be conflicting with the default Sitecore Client route. Implement this using custom route. Follow this link - https://kb.sitecore.net/articles/700677
I shall also suggest to use Route attribute instead and this is how it can be done. (I havent tested following code)
[RoutePrefix("api/Custom")]
public class MyCustomController : ApiController
{
ICustomRepository _customRepository;
public MyCustomController(ICustomRepository _customRepository
{
_customRepository= customRepository
}
[Route("GetCustomMethod")]
[HttpPost]
public IHttpActionResult GetCustomMethod()
{
......
......
return Ok(results);
}
}
Had the custom route registered as in the article in sandy's answer (https://kb.sitecore.net/articles/700677), however it kept crashing with the same error because I included "Controller" when specifying the controller name, removing it fixed the issue (see https://stackoverflow.com/a/41901846/712700).
I am new to ember.js, I am trying to save the model from another contoller where i have am able to get all the information of the model. Whenever i try to save the model using the code below
saveModel: function(model) {
model.save();
},
I am getting this error
Uncaught TypeError: model.save is not a function
Any idea how to solve this error?
Model information is getting passed from components using this.sendAction().
this.sendaction() should be CamelCase -> this.sendAction()
Check the Ember Guides for Components -> Handling Events to make sure you are using this.sendAction() correctly
Make sure by debugging that model is being passed correctly from the component.
Had the same error.
Using _internalModel works but is an ugly solution. My mistake was binding the model to the promise
this.set('prop', this.get('store').findRecord('model', id))
and not use
this.get('store').findRecord('user', this.selectedUser.id).then(function(model) {
self.set('prop', model);
});
Hope that this helps someone having the same problem.
i've installed LiipFunctionalTestBundle and try to use it since yesterday but i've got an error and i don't know how to solve it.
I use the basic configuration as describe in the documentation(config_test) :
framework:
test: ~
session:
storage_id: session.storage.filesystem
liip_functional_test: ~
doctrine:
dbal:
default_connection: default
connections:
default:
driver: pdo_sqlite
path: %kernel.cache_dir%/test.sql
I create a simple test file in my bundle, just to know if my db is loaded:
class AdControllerTest extends WebTestCase
{
public function testIndex()
{
$client = static::createClient();
$this->loadFixtures(array());
$this->assertTrue(true);
}
}
When i use $this->loadFixtures(array()); it's works fine, so i can start off with an empty database (initialized with my schema)
But When i replace it and try to use a fixture i have an error like this :
$this->loadFixtures(array('\Blabla\MyBunble\DataFixtures\ORM\LoadUserData'));
Now i have this error :
Doctrine\DBAL\DBALException: An exception occurred while executing 'PRAGMA table_info(transaction)':
SQLSTATE[HY000]: General error: 1 near "transaction": syntax error
I'm pretty new in testing, if someone use this bundle and as a tips, i'll be grateful :)
Thanks
I have the same error and it has driven me nuts for two hours, the only info related with symfony and testing was this question but my namespaces and routes where OK... so whats the problem? It's silly easy... TRANSACTION is a SQLite keyword: https://www.sqlite.org/lang_keywords.html If I remove the cache the test where working but when it cames to retrieve the table info it crashes because of the table name.
I hope it results helpful for anybody else that could have the same problem.
Ok it was a stupid mistake.
When i cleaned the cache i saw the real error : loadFixtures was unable to find my fixture because of a wrong namespace.
Is there any possibility that I can test CakePHP plugins?
All of my core Controller and Model tests are working fine but when I try to test the controller of my plugin it gives me the error:
Trying to get property of non-object
See my code below:
public function testTest() {
$result = $this->testAction("/MyPluginController/trst",array("return"=>"vars"));
debug($result);
}
Any ideas?
thank you in advance
Did you add App::uses at the top?
App::uses('ControllerNameController', 'MyPlugin.Controller');