Base table or view not found Magento - mysql

I have installed a new theme called Express (pt_express) from Magento and I am having issues. I keep getting "There is a problem with the reindexing process" when I go to reindex all the files there. The one called "PT Express" (that got created when I made the theme) is the one that cannot be reindexed. When I tried to do it via SSH I got this:
PT Filter index process unknown error:
exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not
found: 1146 Table 'justind1_direct.filter_attribute_url_key' doesn't exist'
in /home/justind1/public_html/lib/Zend/Db/Statement/Pdo.php:228
However, everything else indexed fine.
I looked in phpMyAdmin and I know the table isn't there, but I don't know how to create it. How do I create this table so it exists?

The table
`filter_attribute_url_key`
is not part of any stock magento system I've heard of. That, plus the fact that googling for that table name only brings up this ticket, point to this table (and problem) being
Part of a module that came with your theme
Part of some custom code you have on your system that's interacting poorly with the code that came with your them
I'd look at the modules that came with your theme -- particularly the sql folder. These contain setup resource files (migrations) that should automatically run if you load Magento with an empty cache. That's normally how modules add new needed tables.
You also might try asking your vendor for support.
Without more research you're unlikely to find an answer here, given the very specific nature of the problem and the known state of your specific system.

Related

Unable to create a new project in Web2Project

I recently downloaded Web2Project after going through the reviews. Installation was a breeze and the application is neatly aligned. I was able to create the users, assign permissions, create companies etc.
However when I am trying to create a project , despite filling all the fields in the screen the page just refreshes back without giving any error message or creating a project.
I am looking to see if there is a way to troubleshoot what is going on with the page. I tried exploring to create an account in Web2Project support forums but not able to create an account through the available media and hence seeking technical assistance through Stackoverflow.
Web2Project New Installation
Web2Project Code (Just installed on WAMP Server) -- Projects Module
After filling all the fields in the Project Screen, the project should be created.
But the screen just refreshes without creating the project. No errors shown. When I go to Project List page nothing is created.
I was facing same problem. Took a lot of work until realized that the cause was the field PROJECT_ID of the table PROJECTS was not created with the auto increment definition. I just seted up this property and the problem was solved.
How did i discover the cause of the problem? In the SYSTEM ADMIN module, access the SYSTEM CONFIGURATION page, and then set the value of the field DEBUG LEVEL to 1, and check the field SHOW DEBUG MESSAGES. This will allow the web2project to log into C:\Windows\Temp\PHP72x64_errors.log (in case of my instalation) the error.
Good luck!
I'm facing the same problem and took a lot time to solved until I came here.
Goto the table project immediately, found no auto_increment in project_id field. Put it on, it worked!
And hoping current web2Project maintainer will fix this in their installer.
Thank you!

Recreate content entity table in Drupal 8

I have a custom module and just created a content entity using drupal generate:entity:content.
Played a bit with it, and deleted table from PHPMyAdmin.
Now, I am unable to recover it back, I tried to create table again, but drush updatedb --entity-updates does not help to get table back in shape. Looks like table metadata lives somewhere else.
How can I rebuild the table?
UPDATE:
Achieved by reinstalling the module. Please share if there is a better way to do it.
I can't uninstall the module because base table not found error.
drupal update:entities
This command creates the missing entity table for me.

ownCloud app development, populate database table on installation of app

I'm creating two database tables for my ownCloud app in the "database.xml" file. This means it will automatically generate these two tables when you add/install the app, but they are obviously empty.
I'm wanting to put some default entries in one table on installing/adding the app. Is this at all possible?
Thanks!
After searching for a while, as well as trying and failing, I think I have solved my question and thought I'd share it with everyone.
It simply does not work as it's most likely not supported!
Using this documentation for MDB2 XML notation, I found you can use the "initialization" tag to make this happen, but the MDB2 version used in ownCloud most likely does not support this. Looking in the log after putting this tag in, I got this error message:
"app":"core","message":"Failed to update database structure (exception 'DomainException' with message 'Unknown element: initialization'
I also tried with a "unique" tag from the same documentation, but with a similar error. And previously I've asked a question on the ownCloud forum regarding foreign keys, but again with the same result. The answer then was that it was not supported, which is most likely the case regarding this as well.
Hope this helps another developer with similar issues, but be aware that this might change in the future and that they might support this then. If so, please let me know and I will delete/update this Q&A.

Refresh destination schema metadata in Integration Services

I have been working on a huge ETL project with 150+ tables and during the design I had to make a major change on destination column names and data types for a couple of tables.
My problem is that I can't get SSIS to see the new schema for the tables I changed. So I would like to know how can I get SSIS to refresh this schema? I find it kind of ridiculous that there no way to tell SSIS to update the metadata from database schema, especially for database migration.
Recreating the project from scratch is out of question because I already spent some hours on it. Also changing manually the 400+ columns I changed is also not an option.
What about using the Advanced Editor and pressing the Refresh button on the left side below?
Following my previous auto-answer, I finally found what was preventing the metadata from being refreshed.
When I originally modified my database, I actually executed another script that was making a DROP on the table and then a CREATE TABLE to recreate the table from scratch. There, SSIS was never able to detect changes and I had to do all the things in my other answer.
Later today I had to make some minor modification and this time I opted for an ALTER TABLE. Magically, this time SSIS detected all the changes even notifying me to refresh columns from the advanced editor, which worked fine.
So basically all these issues has been caused by my poor knowledge about DBA and its best practices.
I found a way to fix it but that was a bit tricky.
Even thought I was completely removing any references of the table from my packages, I was always getting the old metadata.
I still don't have a clear fix but here is what I did to fix it:
Removed any reference to concerned source and destination tables
Deleted obj and bin folder from the project folder
Saved, closed and then reopened the project
Created new data flow from scratch and updated metadata was finally there
Don't know where those informations were cached but I suspect that the obj folder keeps a cached copy of your packages or that Visual Studio keeps metadata in memory which is freed when you close it. Anyway, following these steps should fix it.

Linq to SQL and randomly resetting data base table

We have an issue we are seeing where a table seems to be getting reset, the records are deleted and the primary key is reset. This then causes issues with another table that joins to it. I have a theory it might be to do with the connection dropping out when trying to retrieve info from the data context and then submitting a blank/default table. It looks like the data context is being reused rather than creating a new one for each unit of work which I think is the wrong thing to do but i was wondering if this would be the cause of the issue?
when i used local database, i faced same problem. in every run,
visual studio adds main database files into the debug folder and overwrites.
so i see blank database after run. but there is no problem,
because after releasing the solution it happenings not same, and problem disappears.