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

Deleting a source in Backdrop tries to delete a block from a table that doesn’t exist #8

Open
sillygwailo opened this issue Sep 19, 2020 · 4 comments · May be fixed by #20
Open

Deleting a source in Backdrop tries to delete a block from a table that doesn’t exist #8

sillygwailo opened this issue Sep 19, 2020 · 4 comments · May be fixed by #20

Comments

@sillygwailo
Copy link
Member

Steps to reproduce:

  • Create a feed in admin/config/services/aggregator/add/feed
  • Delete the feed admin/config/services/aggregator

This error is shown:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'database_name.block' doesn't exist: 
DELETE FROM {block} WHERE (module = :db_condition_placeholder_0) AND (delta = :db_condition_placeholder_1) ; 
Array ( [:db_condition_placeholder_0] => aggregator [:db_condition_placeholder_1] => feed-3 ) in 
aggregator_save_feed() (line 531 of /path/to/backdrop/modules/aggregator/aggregator.module).

The fix is to convert block management to use config management instead.

@sillygwailo
Copy link
Member Author

One option is just to rip out the blocks configuration altogether and tell site maintainers to use Views instead. 🤔

@sillygwailo
Copy link
Member Author

Here's a first try at removing blocks altogether and relying on Views.

@sillygwailo
Copy link
Member Author

If blocks are converted to configuration management, an update hook is needed for when site maintainers switch from Drupal to Backdrop.

@robertgarrigos
Copy link
Member

I think it's much easier than that. just don't call db_delete('block'). made a pr

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