This instance downloaded from āhttps://github.com/farmOS/farmOS/releases/download/3.1.2/farmOS-3.1.2.tar.gzā link.
Debugging
Uncaught
Object { message: "\nAn AJAX HTTP error occurred.\nHTTP Result Code: 500\nDebugging information follows.\nPath: /log/2/edit?ajax_form=1&_wrapper_format=drupal_ajax\nStatusText: 500 Service unavailable (with message)\nResponseText: The website encountered an unexpected error. Try again later.Drupal\\Component\\Plugin\\Exception\\PluginNotFoundException: The "TotalPrice" plugin does not exist. Valid plugin IDs for Drupal\\Core\\Validation\\ConstraintManager are: Callback, Blank, NotBlank, Email, Choice, CircularReference, DuplicateReference, UniqueBirthLog, CircularGroupMembership, IdTagType, CircularAssetLocation, FileExtension, FileExtensionSecure, FileImageDimensions, FileIsImage, FileNameLength, FileSizeLimit, FileUriUnique, FileValidation, FractionConstraint, GeoType, jsonapi_extras__duplicate_field, Oauth2RedirectUri, Oauth2ScopeReference, State, TaxonomyHierarchy, ProtectedUserField, UserMailRequired, UserMailUnique, UserName, UserNameUnique, ConfigExists, RequiredConfigDependencies, Bundle, EntityChanged, EntityHasField, EntityType, EntityUntranslatableFields, ImmutableProperties, ReferenceAccess, ValidReference, ExtensionExists, ExtensionName, UniquePathAlias, ValidPath, PluginExists, AllowedValues, ComplexData, Count, Null, Length, NotNull, PrimitiveType, Range, Regex, UniqueField, Uuid, ValidKeys in Drupal\\Core\\Plugin\\DefaultPluginManager->doGetDefinition() (line 53 of core\\lib\\Drupal\\Component\\Plugin\\Discovery\\DiscoveryTrait.php). Drupal\\Core\\Plugin\\DefaultPluginManager->getDefinition('TotalPrice') (Line: 21)\nDrupal\\Core\\Validation\\ConstraintFactory->createInstance('TotalPrice', Array) (Line: 83)\nDrupal\\Component\\Plugin\\PluginManagerBase->createInstance('TotalPrice', Array) (Line: 84)\nDrupal\\Core\\Validation\\ConstraintManager->create('TotalPrice', Array) (Line: 123)\nDrupal\\Core\\TypedData\\TypedData->getConstraints() (Line: 45)\nDrupal\\Core\\TypedData\\Validation\\TypedDataMetadata->getConstraints() (Line: 38)\nDrupal\\Core\\TypedData\\Validation\\TypedDataMetadata->findConstraints('Default') (Line: 152)\nDrupal\\Core\\TypedData\\Validation\\RecursiveContextualValidator->validateNode(Object, NULL, 1) (Line: 106)\nDrupal\\Core\\TypedData\\Validation\\RecursiveContextualValidator->validate(Object, NULL, NULL) (Line: 93)\nDrupal\\Core\\TypedData\\Validation\\RecursiveValidator->validate(Object) (Line: 132)\nDrupal\\Core\\TypedData\\TypedData->validate() (Line: 518)\nDrupal\\Core\\Entity\\ContentEntityBase->validate() (Line: 251)\nDrupal\\Core\\Entity\\Entity\\EntityFormDisplay->validateFormValues(Object, Array, Object) (Line: 256)\nDrupal\\inline_entity_form\\Form\\EntityInlineForm->entityFormValidate(Array, Object) (Line: 167)\nDrupal\\inline_entity_form\\Element\\InlineEntityForm::validateEntityForm(Array, Object, Array)\ncall_user_func_array(Array, Array) (Line: 282)\nDrupal\\Core\\Form\\FormValidator->doValidateForm(Array, Object) (Line: 238)\nDrupal\\Core\\Form\\FormValidator->doValidateForm(Array, Object) (Line: 238)\nDrupal\\Core\\Form\\FormValidator->doValidateForm(Array, Object) (Line: 238)\nDrupal\\Core\\Form\\FormValidator->doValidateForm(Array, Object) (Line: 238)\nDrupal\\Core\\Form\\FormValidator->doValidateForm(Array, Object, 'log_harvest_edit_form') (Line: 118)\nDrupal\\Core\\Form\\FormValidator->validateForm('log_harvest_edit_form', Array, Object) (Line: 593)\nDrupal\\Core\\Form\\FormBuilder->processForm('log_harvest_edit_form', Array, Object) (Line: 325)\nDrupal\\Core\\Form\\FormBuilder->buildForm(Object, Object) (Line: 73)\nDrupal\\Core\\Controller\\FormController->getContentResult(Object, Object)\ncall_user_func_array(Array, Array) (Line: 123)\nDrupal\\Core\\EventSubscriber\\EarlyRenderingControllerWrapperSubscriber->Drupal\\Core\\EventSubscriber\\{closure}() (Line: 627)\nDrupal\\Core\\Render\\Renderer->executeInRenderContext(Object, Object) (Line: 121)\nDrupal\\Core\\EventSubscriber\\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)\nDrupal\\Core\\EventSubscriber\\EarlyRenderingControllerWrapperSubscriber->Drupal\\Core\\EventSubscriber\\{closure}() (Line: 181)\nSymfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object, 1) (Line: 76)\nSymfony\\Component\\HttpKernel\\HttpKernel->handle(Object, 1, 1) (Line: 54)\nDrupal\\simple_oauth\\HttpMiddleware\\BasicAuthSwap->handle(Object, 1, 1) (Line: 58)\nDrupal\\Core\\StackMiddleware\\Session->handle(Object, 1, 1) (Line: 48)\nDrupal\\Core\\StackMiddleware\\KernelPreHandle->handle(Object, 1, 1) (Line: 28)\nDrupal\\Core\\StackMiddleware\\ContentLength->handle(Object, 1, 1) (Line: 48)\nDrupal\\Core\\StackMiddleware\\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)\nDrupal\\Core\\StackMiddleware\\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)\nDrupal\\Core\\StackMiddleware\\AjaxPageState->handle(Object, 1, 1) (Line: 51)\nDrupal\\Core\\StackMiddleware\\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)\nDrupal\\Core\\DrupalKernel->handle(Object) (Line: 19)\n", name: "AjaxError", stack: "@http://demofarm.local/sites/default/files/js/js_Hn8_FqEYi1-X-WAT-2HrbyZvTqtoKxEz10MxBNyKHcE.js?scope=footer&delta=0&language=en&theme=gin&include=eJx9UtGSgzAI_CGr33BfksGILWcMOULa8b7-sGpbbeceHGEXwmaDZ8EmsowQ6BerM8XGvsrPcCclQajBK13xFCgOG-8okt6TVhA6L2VsHxx4j3Fhs5IfpqoHGV0hpxccsemZFeUAeo5qXa43KUsrddiC3GPsaGVedVk56XR6wz2HACnjDswKinkHXVFMHoSTQpurnsKDmeOllEyVRIO-fwrKVD_kUTQ_0C0a3rXZkQEFc-KYzbx3rhM4710uyp7HFFDx4M0IaUEsaFq8wJVY3G3QDyjFVD7hGOepbnbVJYgYHjN2ZZAzqtMpoQswoeRqvWErfMsozZoK9na96PHIj9xBmM00317snB_cBxDesAjX1ff9VTEWF9hexSnkYedQJ5zaosqxUuZgy9Gs_8MhG7ot5JaX_NQ0xzXZ1uUKuvFZtDXXKoj_UPWFbX-OQmrMHhJ-zW0HUYJnsml_WZtWbg:312:2411\n@http://demofarm.local/sites/default/files/js/js_Hn8_FqEYi1-X-WAT-2HrbyZvTqtoKxEz10MxBNyKHcE.js?scope=footer&delta=0&language=en&theme=gin&include=eJx9UtGSgzAI_CGr33BfksGILWcMOULa8b7-sGpbbeceHGEXwmaDZ8EmsowQ6BerM8XGvsrPcCclQajBK13xFCgOG-8okt6TVhA6L2VsHxx4j3Fhs5IfpqoHGV0hpxccsemZFeUAeo5qXa43KUsrddiC3GPsaGVedVk56XR6wz2HACnjDswKinkHXVFMHoSTQpurnsKDmeOllEyVRIO-fwrKVD_kUTQ_0C0a3rXZkQEFc-KYzbx3rhM4710uyp7HFFDx4M0IaUEsaFq8wJVY3G3QDyjFVD7hGOepbnbVJYgYHjN2ZZAzqtMpoQswoeRqvWErfMsozZoK9na96PHIj9xBmM00317snB_cBxDesAjX1ff9VTEWF9hexSnkYedQJ5zaosqxUuZgy9Gs_8MhG7ot5JaX_NQ0xzXZ1uUKuvFZtDXXKoj_UPWFbX-OQmrMHhJ-zW0HUYJnsml_WZtWbg:312:19721\n" }
js_Hn8_FqEYi1-X-WAT-2HrbyZvTqtoKxEz10MxBNyKHcE.js:312:2411
It looks like you have a missing plugin which is causing an error. The TotalPrice
plugin is provided by the farm_ledger
module.
Did you have that module previously? Did you delete it without first uninstalling it?
Itās important to always uninstall modules before you delete them to perform all the necessary cleanup.
no @mstenta , i was installed(on windows) today only. No data and module was not installed in this instance.
After, i seen this error i just installed farm_ledger and farm_maple module. But, still error persist.
But, i am using farmos on linux still no erro came like this.
Here is where the TotalPrice
plugin is defined in the farm_ledger
module: src/Plugin/Validation/Constraint/TotalPriceConstraint.php Ā· b05dfb0094289d432517c633793aab225135cd59 Ā· project / farm_ledger Ā· GitLab
There is no other way I can think that you encountered this error. farmOS core does not have any TotalPrice
plugin itself. You can search the codebase for proof of that:
https://github.com/search?q=repo%3AfarmOS%2FfarmOS%20TotalPrice&type=code
But it does show up in farm_ledger
:
https://github.com/search?q=repo%3Amstenta%2Ffarm_ledger%20TotalPrice&type=code
ok, let i try with another fresh installation using [Preformatted text](https://github.com/farmOS/farmOS/releases/download/3.1.2/farmOS-3.1.2.tar.gz)
this link. will check what if happen.
constraints:
- Window 10 Home.
- XAMPP server with php8.2
@mstenta thank you for your responses. But, still error coming. i just attached screenshots for your reference.
Maybe the error you posted earlier was unrelated. Are you still seeing PluginNotFoundException
in your log?
PluginNotFoundException
this error not came. but, error not solved.
i am just checking which function working behind this allowed types checking. i was entered āstringā as value then Value must be a number.
this error came.
for you reference, i added image below.
can you give idea of which function check that value is allowed types or not?. i may found error causing problem from that point.
@mstenta, that above instance are created from packaged release. i couldnāt install farmOS via composer on windows 10 home
. error shown below.
Iām really not sure whatās causing a PrimitiveTypeConstraint
validation in your instance. Iāve never encountered that before.
What database are you using? PostgreSQL (recommended)? MariaDB/MySQL? SQLite3?
I do know the answer to this one: Windows WSL2 does not include the patch
command by default, which is required by our composer.json
to apply patches to Drupal core and modules. You will need to install that utility in order to use Composer to build farmOS on Windows.
initially i was used git patch tool.but,it throws above error.
now i am using cygwin (when installing take packages from mirrors.aliyun.com ā select patch tool) patch tool. itās working fine and farmos installed successfully.
PrimitiveTypeConstraint
problem not solved.
i am using 10.4.28-MariaDB (XAMPP3.3.0 server default mysql).
itās working fine and farmos installed successfully.
Glad to hear it!
@aathi179 Are you able to replicate this on https://farmos-demo.rootedsolutions.io/ or a Farmier-hosted instance? I want to know if this is isolated to your environment, or if we can replicate it somewhere else.
@mstenta ,
i think this problem coming because of mismatch of driver.
#settings.php
$databases['default']['default'] = array (
'database' => 'farmos',
'username' => 'root',
'password' => '',
'prefix' => '',
'host' => 'localhost',
'port' => '3306',
'isolation_level' => 'READ COMMITTED',
'namespace' => 'Drupal\\mysql\\Driver\\Database\\mysql',
'driver' => 'mysql',
'autoload' => 'core/modules/mysql/src/Driver/Database/mysql/',
);
this is db server. please wait i am trying with postgresql. if didnāt work we will replicate.
thank you.
No that shouldnāt cause any issue. MariaDB uses the MySQL driver (MariaDB is a drop-in replacement for MySQL).
OK, trying with PostgreSQL is a good idea too. farmOS works with both, but PostgreSQL is generally what we recommend.
@mstenta ,sorry, another issue, Why PosgreSQL option not showing when installing farmos?
@aathi179 I have no idea! Iāve never seen that before. But I have never worked with Drupal on Windows before so maybe there is some logic that detects possible options and only shows a limited set.
Donāt try to use the MySQL driver with a PostgreSQL database - that will almost definitely cause trouble. Iām not sure what advice to give. This is a broader Drupal question, not farmOS specific, so you could try searching Drupal forums.
@mstenta ,ok thank you, but, i have tried with sqlite same error coming.
@aathi179 Has this ever worked for you? Or is this the first time you are trying to create any quantity in farmOS?
no, i am using live farmos in my linux ubuntu os server.There i created quantity and inventory all are working good. Last we talked forum based i was trying in my local laptop.
now i am planning to use docker or WSL.