permission_block error in Magento? - magento-1.7

I have to installed Magento patches SUPEE 6788, after that content on home page is missing, when i add blocks system->permission-> block it generate error
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'exclusiv_c523.permission_block' doesn't exist
How can I proceed?

The table permission_block should be created as part of the upgrade of Mage_Admin from version 1.6.1.1 to 1.6.1.2. You can verify that the setup/upgrade scripts succeeded by checking the version and data_version fields in the core_resource table:
select * from core_resource where code = 'admin_setup';
Both values should show version 1.6.1.2, if either of them do not have this value then it's likely that the upgrade failed.

Related

Object reference exception when importing content in Episerver

We are using Optimizely/Episerver CMS 11.20. When trying to export a page hierarchy from our production environment and then import the resulting ExportedFile.episerverdata file to our acceptance test environment I get the following error:
[Importing content 70725_133679] Exception: Object reference not set to an instance of an object.
I have no idea what 70725_133679 is referring to. Is there a way to look this up, e.g. via an SQL query against the "EPi" database?
It refers to a specific version of some content (which could be just about anything).
You could try to browse to https://yoursite/EPiServer/CMS/#context=epi.cms.contentdata:///70725_133679 (note the ID at the end) to see which content it is.
Got another answer on a Optimizely forum (thanks to Surjit Bharath):
The following SQL against the EPi database gives information about the referenced content:
select * from tblContent where pkID = 70725 
select * from tblWorkContent where pkID = 133679
This too points to a submit button. I have yet to understand why that block would cause an exception during import, but now I at least have a place to start digging.

Magento Page Builder - 500 Internal Server error

I just wanted to add a Slider block in my Magento 2.4.4 build in Pagebuilder and I'm getting an 500 Internal Server error when I click on Edit. I have this problem also with the Image block.
I have this in my browser console:
https://example.com/admin/mui/index/render_handle/buttons/1/key/3d12a8a6a2372ed459fc9684018ea6fbb954bd41478fe44d9f2e969ed409a639/?namespace=pagebuilder_slide_form&handle=pagebuilder_slide_form&isAjax=true
[HTTP/1.1 500 Internal Server Error 887ms]
Do you know where I can start to search where this is comming from?
The debug.log and system.log says:
magento main.ERROR: The requested store cannot be found.
I found the solution folowing the steps from Silas Palmer found here: https://magento.stackexchange.com/questions/156176/magento-2-requested-store-is-not-found?newreg=9ac715264c1949e69c8b1a78c0100133
That makes the error code more clear.
In my case it says:
main.ERROR: The store ID (3) that was requested wasn't found. Verify the store and try again.
So I crated a new store view and it works now.
Here is what I did:
This generally happens whenever config.php and the database get out of sync. For example, whenever I import a database back to my local development environment.
Here were the steps I used to troubleshoot and fix this.
Make the error messages more helpful:
Change vendor/magento/module-store/Model/StoreRepository.php to this (on your local, temporarily)
// Around line 74
if ($store->getId() === null) {
// Add this to see a backtrace
// debug_print_backtrace();
// Add this to see the store code causing the issue: (code:{$code})
throw new NoSuchEntityException(
__("The store (code:{$code}) that was requested wasn't found. Verify the store and try again.")
);
}
// .......
// Around line 114, same kind of thing...
if ($store->getId() === null) {
// debug_print_backtrace();
throw new NoSuchEntityException(
__("The store ID ({$id}) that was requested wasn't found. Verify the store and try again.")
);
}
Run php bin/magento s:up and make a note of the store id and/or store codes that are causing the issues. If you have added the backtrace, that will spool variables forever and you might need to do something like this instead: php bin/magento s:up > output.txt (wait 3 minutes, press ctrl-d to kill it) less output.txt
Go through app/etc/config.php and make sure all the stores line up with whatever is in the store table in the database. Note the store id from step 1, that will give you clues where to look. If there are differences, change config.php and not the database.
Run this against the database:
Change scope_id value (99) to whatever store_id you got in step #1
DELETE FROM core_config_data WHERE scope_id = 99
Change like value ('%xx_en%') to whatever store code you got in step #1
DELETE from flag where flag_data like '%xx_en%'
Run php bin/magento s:up again, hopefully there are no errors this time. Otherwise you may have to repeat some steps.

Why is WPML creating multiple file entries after saving

I have a Wordpress installation using WPML, ACF, and Custom Post Types. When I save a new entry for any custom post-type (also for Page) it is saving it as 2 or more entries. When I erase one of those entries, all of them are gone. When I try to remove them permanently from the trash, I get an error message.
Whenever I save a post I have two (or more entries) with the same title. When I want to delete it, it gives me this error:
Warning: mysqli_query(): (21000/1242): Subquery returns more than 1 row
in /wp-includes/wp-db.php on line 2056
WordPress database error: [Subquery returns more than 1 row]
SELECT translation_id FROM wp_icl_translations WHERE trid =
(SELECT trid FROM wp_icl_translations
WHERE element_id=3596 AND element_type='post_people')
When I do a translation into Spanish and save it - there are 3-6 posts in Spanish with the same title.
I tried with the WPML Form. Reinstalling all the plugins again. Reset things in the troubleshooting page. We have around 1000 entries and now we run into this problem.
Any idea where it could have gone wrong and how to solve it?

How do I use an SQLCMD variable to define a table name?

So, using SSDT on Visual Studio 2013, I can specify a Database name...
create view vSample1 as
select * from [$(RandomDatabase)].dbo.TableName
I can also do this with a four part name
create view vSample2 as
select * from [$(RandomServer)].[$(RandomDatabase)].dbo.TableName
But when I try to do this with the TableName, I get errors...
create view vSample3
select * from [$(RandomServer)].[$(RandomDatabase)].dbo.[$(RandomTable)]
It gives me an error similiar to
Error: SQL71561: View: [vSample3] has an unresolved reference to object [$(RandomServer)].[$(RandomDatabase)].dbo.[$(RandomTable)].
I've been looking at the SQLCMD variables window in the project settings and have verified that the $(RandomTable) variable is defined as TableName, but it still gives me build errors.
Why is this, and how do I fix it?
Thanks
I would use pre/post deployment script to create such view using sp_executesql and dynamic query.
exec sp_executesql N'create view vSample3 as
select * from [$(RandomServer)].[$(RandomDatabase)].dbo.[$(RandomTable)]'
I would use synonyms - create a table which matches the actual table and create a synonym that points to that, then reference the synonym in the view or just reference instead of the view. You need this so you get it to compile and you get the good stuff like references etc.
Then when you deploy to each server just deploy the correct synonym to the correct server.
(Then kick your vendor in the b&DD$ for such an annoying system)

Typo3 Tree Import fail

I'm using Typo3 6.2 and I want move my Projekt to another Computer with Typo3 6.2 but I'm failing to import the tree structure ...
When I'm import a single page it works but when if the page has a subpages it doesnt work.
After I uploading a receive this Error:
"Possible error: pages:15 had no new id assigned to it. This indicates that the record was not added to database during import. Please check changelog!"
Here is the import file, maybe it just doesnt work on my system...
File leist.t3d
means
I had this error, too.
In my case, I got an error message after enabling error messages, it was a missing field in table "pages", after a "DB compare", the import worked.
Not sure, but is sounds like a known bug:
https://forge.typo3.org/issues/59055
Or more specific (copy pasted from that bug):
When I change uniqid('NEW'); to uniqid('NEW', TRUE); in class
ImportExport the functional tests aren't failing and I assume
introduction extension is imported correctly (no errors in typo3.log).
(again not totally certain) but you might wanna patch it for testing or fetching a patched source for
/typo3/sysext/impexp/Classes/ImportExport.php