Check Tables [Deleted]

  • Thread starter Thread starter Deleted member 232995
  • Start date Start date
Açıklamayı okudum ve var'ı ekledim, ancak işe yaramadı. Süper yönetici hesabım kullanıcı kimliği 1'dir, bu yüzden şunu ekledim:
$config['X0815']['ChkTables']['renameData'] = 1;
ve işe yaramadı. Bu şekilde mi formatlanmalı?
$config['X0815']['ChkTables']['renameData'] = '1';
 
Happens while checking ...
Code:
 Cannot declare class SV\SignupAbuseBlocking\Entity\LogEvent, because the name is already in use
 
Great idea and very useful (y)

..but this addon does not work with a database replication (server error on "Check Tables"). :rolleyes:

In class X0815\ChkTables\ChkTable there is on line 42:
PHP:
        $dbname = $config['db']['dbname'];
Quick fix:
PHP:
        if (isset($config['db']['write']['dbname']))
        {
            $dbname = $config['db']['write']['dbname'];
        }
        else
        {
            $dbname = $config['db']['dbname'];
        }
.. but there must be a more generic way, I guess. 🤔
 
@0815, you have a bug in your addon, that can cause errors like this one:

Code:
Error: Call to undefined method XF\Entity\SitemapLog::where() src/XF/Mvc/Entity/Entity.php:816
Generated by: Unknown account 18.4.2022 at 22:42
Stack trace
#0 src/XF/Mvc/Entity/Entity.php(666): XF\Mvc\Entity\Entity->_verifyUniqueValue(1650314558, 'sitemap_id', true)
#1 src/XF/Mvc/Entity/Entity.php(570): XF\Mvc\Entity\Entity->set('sitemap_id', 1650314558)
#2 src/XF/Repository/SitemapLog.php(49): XF\Mvc\Entity\Entity->__set('sitemap_id', 1650314558)
#3 src/XF/Sitemap/Builder.php(484): XF\Repository\SitemapLog->logPendingBuild(1650314558, 4, 1, true)
#4 src/XF/Sitemap/Builder.php(88): XF\Sitemap\Builder->logPending()
#5 src/XF/Job/Sitemap.php(27): XF\Sitemap\Builder->build(7.40364)
#6 src/XF/Job/Manager.php(260): XF\Job\Sitemap->run(7.40364)
#7 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 7.40364)
#8 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 7.40364)
#9 job.php(43): XF\Job\Manager->runQueue(false, 8)
#10 {main}
Request state
array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(27) "https://xf22.test/admin.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

The stack trace does not show any of your addon files, so it was hard to find the reason for this happening, but with the help of a developer we identified the bug in your addon:

You run a cron each hour on minute 49: "Check tables file scanner" / class + method: X0815\ChkTables\Cron\Scanner::runScanner. This starts a job, and this chain follows:

X0815\ChkTables\ChkTable::getLostTablesForFileScan
X0815\ChkTables\ChkTable::loadTableDataSystem
X0815\ChkTables\ChkTable::createUsedTablesAndColumns
X0815\ChkTables\ChkTable::getEntity
XF\Mvc\Entity\Manager::getEntityStructure

In X0815\ChkTables\ChkTable::getEntity you use FQCNs (full qualified class names) instead of XF entity short-names. This seems to work somehow, but causes some subsequent calls in the same request (ie. during the same cron run) to return entities unexpectedly.
 
I get this error on latest XF 2 version:
have you added your user id in config.php?

Important Info:
There is a flag for the "config.php" with which you can activate the renaming of a table/column. As with the XF superAdmin flag, the admin user IDs that are to have access to the add-on must be entered here.
$config['X0815']['ChkTables']['renameData'] = ADMIN_USER_IDs;
 
@0815 Please add support check Resource standards.

ScreenShot00526.png

Also blank page after addon installed and run Check Tables:

ScreenShot00527.png

Server error log:

Code:
ErrorException: Fatal Error: Class Nulumia\SeoTools\XF\Entity\AbstractNode contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (XF\Entity\AbstractNode::getNodeTemplateRenderer) src/addons/Nulumia/SeoTools/XF/Entity/AbstractNode.php:0

Generated by: Nirjonmela Aug 26, 2022 at 2:46 AM

Stack trace

#0 [internal function]: XF::handleFatalError()
#1 {main}

Request state

array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(210) "/admin.php?tools/run-job&only_ids=1764899&_xfRedirect=https%3A%2F%2Fmysite.com%2Fadmin.php%3Ftools%2Frun-job%26only%3DscanTables%26_xfRedirect%3D%252Fadmin.php%253Ftools%252Fchk-tables"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(108) "/admin.php?tools/run-job&only=scanTables&_xfRedirect=%2Fadmin.php%3Ftools%2Fchk-tables"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(7) "1764899"
  }
}
 
Server error log:
seems to come from this addon:


(according to the reviews it is quite buggy)
 
Regarding this:
@0815 Please add support check Resource standards.
I don't have the latest version, but I don't see any tables/columns created by the addon. It uses simpleCache for saving the scan results.

And regarding renaming: IMHO there is no conflict with XF resource standards, because the renamed tables / columns are meant for deletion.
 
Also blank page after addon installed and run Check Tables:
Unfortunately, I cannot reproduce this as I do not own this add-on. Therefore, I cannot check if it is due to the add-on in question or if it is triggered by my add-on.
 
What kind of trouble do you have?
I use it since first release and have actual no problems with it.
Otherwise, post your errors, so the developer can solve them when he have the time - its a free add-on. ;-)
 
Top Bottom