Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working but not clean #1

Open
djzwerg opened this issue Feb 10, 2022 · 6 comments
Open

Working but not clean #1

djzwerg opened this issue Feb 10, 2022 · 6 comments

Comments

@djzwerg
Copy link
Owner

djzwerg commented Feb 10, 2022

Notice: Undefined property: TaxonomyTerm::$vid in tvi_get_term_info() (line 379 of /path/modules/tvi/tvi.module).

@indigoxela
Copy link

Notice: Undefined property: TaxonomyTerm::$vid

Should be TaxonomyTerm::$vocabulary, or $term->vocabulary.

See also: https://docs.backdropcms.org/api/backdrop/core%21modules%21taxonomy%21taxonomy.entity.inc/class/TaxonomyTerm/1

@argiepiano
Copy link

Also you will need to replace $vocabulary->vid with $vocabulary->machine_name in line 142. In Backdrop, Vocabularies don't use the numerical vid anymore.

@argiepiano
Copy link

argiepiano commented Feb 10, 2022

One more suggestion: the original module used the table variable to store configurations. In Backdrop, config files are preferred (they allow, for example, easy exports/imports). See https://docs.backdropcms.org/change-records/variable_get-variable_set-and-variable_del-deprecated-by-cmi

(variable_get and variable_set are deprecated)

@djzwerg
Copy link
Owner Author

djzwerg commented Feb 10, 2022

Thanks @indigoxela @argiepiano - I've changed the $vocabulary->vid coding. Where did you find the variable @argiepiano ?

@djzwerg djzwerg changed the title Not working Working but not clean Feb 10, 2022
@argiepiano
Copy link

Where did you find the variable @argiepiano ?

@djzwerg not sure if I saw that in an earlier version of the module - now I see that it's using a config file, and the variable is removed in the update_1000 hook.

@djzwerg
Copy link
Owner Author

djzwerg commented Feb 10, 2022

Intermediate status: the selected views are displayed in the frontend but the selection field in the backend is still empty after saving.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants