Upgrade error ValidationError: Search field manufacturer is not valid

Issue while upgrading from V11 to V12

<pre>Traceback (most recent call last):
  File &quot;/usr/lib/python2.7/runpy.py&quot;, line 174, in _run_module_as_main
    &quot;__main__&quot;, fname, loader, pkg_name)
  File &quot;/usr/lib/python2.7/runpy.py&quot;, line 72, in _run_code
    exec code in run_globals
  File &quot;/home/jbdserv/frappe-bench/apps/frappe/frappe/utils/bench_helper.py&quot;, line 97, in &lt;module&gt;
    main()
  File &quot;/home/jbdserv/frappe-bench/apps/frappe/frappe/utils/bench_helper.py&quot;, line 18, in main
    click.Group(commands=commands)(prog_name=&apos;bench&apos;)
  File &quot;/home/jbdserv/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py&quot;, line 764, in __call__
    return self.main(*args, **kwargs)
  File &quot;/home/jbdserv/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py&quot;, line 717, in main
    rv = self.invoke(ctx)
  File &quot;/home/jbdserv/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py&quot;, line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File &quot;/home/jbdserv/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py&quot;, line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File &quot;/home/jbdserv/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py&quot;, line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File &quot;/home/jbdserv/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py&quot;, line 555, in invoke
    return callback(*args, **kwargs)
  File &quot;/home/jbdserv/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py&quot;, line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File &quot;/home/jbdserv/frappe-bench/apps/frappe/frappe/commands/__init__.py&quot;, line 25, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File &quot;/home/jbdserv/frappe-bench/apps/frappe/frappe/commands/site.py&quot;, line 235, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website, skip_failing=skip_failing)
  File &quot;/home/jbdserv/frappe-bench/apps/frappe/frappe/migrate.py&quot;, line 49, in migrate
    frappe.modules.patch_handler.run_all(skip_failing)
  File &quot;/home/jbdserv/frappe-bench/apps/frappe/frappe/modules/patch_handler.py&quot;, line 41, in run_all
    run_patch(patch)
  File &quot;/home/jbdserv/frappe-bench/apps/frappe/frappe/modules/patch_handler.py&quot;, line 30, in run_patch
    if not run_single(patchmodule = patch):
  File &quot;/home/jbdserv/frappe-bench/apps/frappe/frappe/modules/patch_handler.py&quot;, line 71, in run_single
    return execute_patch(patchmodule, method, methodargs)
  File &quot;/home/jbdserv/frappe-bench/apps/frappe/frappe/modules/patch_handler.py&quot;, line 91, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + &quot;.execute&quot;)()
  File &quot;/home/jbdserv/frappe-bench/apps/erpnext/erpnext/patches/v12_0/add_export_type_field_in_party_master.py&quot;, line 11, in execute
    make_custom_fields()
  File &quot;/home/jbdserv/frappe-bench/apps/erpnext/erpnext/regional/india/setup.py&quot;, line 502, in make_custom_fields
    create_custom_fields(custom_fields, update=update)
  File &quot;/home/jbdserv/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py&quot;, line 145, in create_custom_fields
    custom_field.save()
  File &quot;/home/jbdserv/frappe-bench/apps/frappe/frappe/model/document.py&quot;, line 272, in save
    return self._save(*args, **kwargs)
  File &quot;/home/jbdserv/frappe-bench/apps/frappe/frappe/model/document.py&quot;, line 325, in _save
    self.run_post_save_methods()
  File &quot;/home/jbdserv/frappe-bench/apps/frappe/frappe/model/document.py&quot;, line 919, in run_post_save_methods
    self.run_method(&quot;on_update&quot;)
  File &quot;/home/jbdserv/frappe-bench/apps/frappe/frappe/model/document.py&quot;, line 787, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File &quot;/home/jbdserv/frappe-bench/apps/frappe/frappe/model/document.py&quot;, line 1058, in composer
    return composed(self, method, *args, **kwargs)
  File &quot;/home/jbdserv/frappe-bench/apps/frappe/frappe/model/document.py&quot;, line 1041, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File &quot;/home/jbdserv/frappe-bench/apps/frappe/frappe/model/document.py&quot;, line 781, in &lt;lambda&gt;
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File &quot;/home/jbdserv/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py&quot;, line 61, in on_update
    validate_fields_for_doctype(self.dt)
  File &quot;/home/jbdserv/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py&quot;, line 669, in validate_fields_for_doctype
    validate_fields(frappe.get_meta(doctype, cached=False))
  File &quot;/home/jbdserv/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py&quot;, line 977, in validate_fields
    check_search_fields(meta, fields)
  File &quot;/home/jbdserv/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py&quot;, line 831, in check_search_fields
    frappe.throw(_(&quot;Search field {0} is not valid&quot;).format(fieldname))
  File &quot;/home/jbdserv/frappe-bench/apps/frappe/frappe/__init__.py&quot;, line 363, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator=&apos;red&apos;)
  File &quot;/home/jbdserv/frappe-bench/apps/frappe/frappe/__init__.py&quot;, line 349, in msgprint
    _raise_exception()
  File &quot;/home/jbdserv/frappe-bench/apps/frappe/frappe/__init__.py&quot;, line 315, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.ValidationError: Search field manufacturer is not valid
</pre>

It may help to say the operating environment that is being used and the commands used to attempt the upgrade.

tried multiple times, same issue…

@skedia

Have you solved this issue?
I got same kind of error while upgrading from v12.12.0 to latest v13.
The error is:

File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 852, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py”, line 76, in on_update
validate_fields_for_doctype(self.dt)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 739, in validate_fields_for_doctype
validate_fields(meta)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 1050, in validate_fields
validate_data_field_type(d)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 1004, in validate_data_field_type
frappe.msgprint(text_str + df_options_str, title=“Invalid Data Field”, raise_exception=True)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 406, in msgprint
_raise_exception()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 362, in _raise_exception
raise ValidationError(msg)
> frappe.exceptions.ValidationError: Project Title is an invalid Data field.

Only Options allowed for Data field are:

  • Email
  • Name
  • Phone

I have tried
cd /home/frappe/frappe-bench/apps/frappe
git stash (No local changes to save)
git reset --hard
git pull --rebase
git stash
git add .

cd /home/frappe/frappe-bench
bench update

it repeats the above error of validation. Any clue?

I have the custom field “Project Title” in some Doctypes (Quotation, Sales Order, Sales Invoice, etc.)