Jump to content
Latest News: (loading..)

edo.script

Members
  • Content count

    29
  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    Ed
  • Gender
    Male

Recent Profile Visitors

2,258 profile views
  1. @BrockleyJohn That's a good question and frankly I had the same question in mind. And even now when everything works fine at my end I am not sure if that was the main reason. I am suspicious that something else is the main reason. Something that I haven't yet noticed, like a custom setting in MySQL or... I am using: Database: MySQL 5.6.41 with PHP Version: 5.6.30 (Zend: 2.6.0) And this is how I came to that decision. I installed older versions until I found out that Ultimate SEO 2-2.2d-14a properly inserted the SEO URL records into the configuration table and added the SEO URLs link under Admin>Configuration. So I started looking into the SQL query differences and I noticed that in Ultimate SEO 2-2.2d-14a the query is: 'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES (NULL, 'Enable SEO URLs?', 'SEO_ENABLED', 'true', 'Enable the SEO URLs? This is a global setting and will turn them off completely.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"); and in version Ultimate SEO 2-2.2d-17a, of course with other major changes in scripting, the query is changed to 'QUERY' => "INSERT INTO `configuration` VALUES ('', 'Enable SEO URLs?', 'SEO_ENABLED', 'true', 'Enable the SEO URLs? This is a global setting and will turn them off completely.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"); So i decided to manually try both queries in my PHP MyAdmin. The query: "INSERT INTO `configuration` VALUES ('', 'Enable SEO URLs?', 'SEO_ENABLED', 'true', 'Enable the SEO URLs? This is a global setting and will turn them off completely.', 46, 0, NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')" returned and error: SQL query: INSERT INTO `configuration` VALUES ('', 'Enable SEO URLs111?', 'SEO_ENABLED', 'true', 'Enable the SEO URLs? This is a global setting and will turn them off completely.', 46, 0, NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),') MySQL said: #1366 - Incorrect integer value: '' for column 'configuration_id' at row 1 And when I replaced the quotes with NULL the query was executed. So far that's where I am and i would much appreciate a good advise here.
  2. Well, the configuration_id and configuration_group_id are set to AUTO_INCREMENT. And I did see the line: $this->DB->Query("DELETE FROM `configuration` WHERE configuration_group_id = '" . $cfgID['ID'] . "' OR configuration_key LIKE 'SEO_%' OR configuration_key LIKE 'USE_SEO_%'"); There are no other records LIKE 'SEO_%'. After I changed the blank('') values to NULL it started functioning without any issues. All the changes are saved properly. The SEO URLs Enable/Disable works fine. All the changed values are saved and so on. Unless, there is something I haven't noticed yet.
  3. P.S. Actually, I guess I could have also changed the default value for configuration_id and the configuration_group_id from No to NULL.
  4. I hope this will help others who are experiencing the same problem I was facing. In function __construct(){ replace all '' values for configuration_id with NULL in other words replace: 'QUERY' => "INSERT INTO `configuration` VALUES ('', 'Enable SEO URLs?', 'SEO_ENABLED', 'true', 'Enable the SEO URLs? This is a global setting and will turn them off completely.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"); with 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Enable SEO URLs?', 'SEO_ENABLED', 'true', 'Enable the SEO URLs? This is a global setting and will turn them off completely.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"); Here is the edited version: function __construct(){ $this->attributes = array(); $x = 0; $this->default_config = array(); $this->default_config['SEO_ENABLED'] = array('DEFAULT' => 'true', 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Enable SEO URLs?', 'SEO_ENABLED', 'true', 'Enable the SEO URLs? This is a global setting and will turn them off completely.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"); $x++; $this->default_config['SEO_ADD_CID_TO_PRODUCT_URLS'] = array('DEFAULT' => 'false', 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Add cPath to product URLs?', 'SEO_ADD_CID_TO_PRODUCT_URLS', 'false', 'This setting will append the cPath to the end of product URLs (i.e. - some-product-p-1.html?cPath=xx).', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"); $x++; $this->default_config['SEO_ADD_CPATH_TO_PRODUCT_URLS'] = array('DEFAULT' => 'false', 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Add category parent to product URLs?', 'SEO_ADD_CPATH_TO_PRODUCT_URLS', 'false', 'This setting will append the category parent(s) name to the product URLs (i.e. - parent-some-product-p-1.html).', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"); $x++; $this->default_config['SEO_ADD_CAT_PARENT'] = array('DEFAULT' => 'false', 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Add category parent to begining of URLs?', 'SEO_ADD_CAT_PARENT', 'false', 'This setting will add the category parent(s) name to the beginning of the category URLs (i.e. - parent-category-c-1.html).', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"); $x++; $this->default_config['SEO_URLS_FILTER_SHORT_WORDS'] = array('DEFAULT' => '3', 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Filter Short Words', 'SEO_URLS_FILTER_SHORT_WORDS', '3', 'This setting will filter words less than or equal to the value from the URL.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, NULL)"); $x++; $this->default_config['SEO_URLS_USE_W3C_VALID'] = array('DEFAULT' => 'true', 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Output W3C valid URLs (parameter string)?', 'SEO_URLS_USE_W3C_VALID', 'true', 'This setting will output W3C valid URLs.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"); $x++; $this->default_config['USE_SEO_CACHE_GLOBAL'] = array('DEFAULT' => 'true', 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Enable SEO cache to save queries?', 'USE_SEO_CACHE_GLOBAL', 'true', 'This is a global setting and will turn off caching completely.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"); $x++; $this->default_config['USE_SEO_CACHE_PRODUCTS'] = array('DEFAULT' => 'true', 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Enable product cache?', 'USE_SEO_CACHE_PRODUCTS', 'true', 'This will turn off caching for the products.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"); $x++; $this->default_config['USE_SEO_CACHE_CATEGORIES'] = array('DEFAULT' => 'true', 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Enable categories cache?', 'USE_SEO_CACHE_CATEGORIES', 'true', 'This will turn off caching for the categories.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"); $x++; $this->default_config['USE_SEO_CACHE_MANUFACTURERS'] = array('DEFAULT' => 'true', 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Enable manufacturers cache?', 'USE_SEO_CACHE_MANUFACTURERS', 'true', 'This will turn off caching for the manufacturers.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"); $x++; $this->default_config['USE_SEO_CACHE_ARTICLES'] = array('DEFAULT' => 'true', 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Enable Articles Manager Articles cache?', 'USE_SEO_CACHE_ARTICLES', 'false', 'This will turn off caching for the Articles Manager articles.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"); $x++; $this->default_config['USE_SEO_CACHE_TOPICS'] = array('DEFAULT' => 'true', 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Enable Articles Manager Topics cache?', 'USE_SEO_CACHE_TOPICS', 'false', 'This will turn off caching for the Articles Manager topics.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"); $x++; $this->default_config['USE_SEO_CACHE_FAQDESK_CATEGORIES'] = array('DEFAULT' => 'true', 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Enable FAQDesk Categories cache?', 'USE_SEO_CACHE_FAQDESK_CATEGORIES', 'false', 'This will turn off caching for the FAQDesk Category pages.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"); $x++; $this->default_config['USE_SEO_CACHE_INFO_PAGES'] = array('DEFAULT' => 'true', 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Enable Information Pages cache?', 'USE_SEO_CACHE_INFO_PAGES', 'false', 'This will turn off caching for Information Pages.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"); $x++; $this->default_config['USE_SEO_CACHE_LINKS'] = array('DEFAULT' => 'true', 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Enable Links Manager cache?', 'USE_SEO_CACHE_LINKS', 'false', 'This will turn off caching for the Links Manager category pages.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"); $x++; $this->default_config['USE_SEO_CACHE_NEWSDESK_ARTICLES'] = array('DEFAULT' => 'true', 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Enable NewsDesk Articles cache?', 'USE_SEO_CACHE_NEWSDESK_ARTICLES', 'false', 'This will turn off caching for the NewsDesk Article pages.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"); $x++; $this->default_config['USE_SEO_CACHE_NEWSDESK_CATEGORIES'] = array('DEFAULT' => 'true', 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Enable NewsDesk Categories cache?', 'USE_SEO_CACHE_NEWSDESK_CATEGORIES', 'false', 'This will turn off caching for the NewsDesk Category pages.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"); $x++; $this->default_config['USE_SEO_CACHE_POLLBOOTH'] = array('DEFAULT' => 'true', 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Enable Pollbooth cache?', 'USE_SEO_CACHE_POLLBOOTH', 'false', 'This will turn off caching for Pollbooth.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"); $x++; $this->default_config['USE_SEO_CACHE_PAGE_EDITOR'] = array('DEFAULT' => 'true', 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Enable Page Editor cache?', 'USE_SEO_CACHE_PAGE_EDITOR', 'false', 'This will turn off caching for the Page Editor pages.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"); $x++; $this->default_config['USE_SEO_REDIRECT'] = array('DEFAULT' => 'true', 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Enable automatic redirects?', 'USE_SEO_REDIRECT', 'true', 'This will activate the automatic redirect code and send 301 headers for old to new URLs.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"); $x++; $this->default_config['USE_SEO_HEADER_TAGS'] = array('DEFAULT' => 'false', 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Enable use Header Tags SEO as name?', 'USE_SEO_HEADER_TAGS', 'false', 'This will cause the title set in Header Tags SEO to be used instead of the categories or products name.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"); $x++; $this->default_config['USE_SEO_PERFORMANCE_CHECK'] = array('DEFAULT' => 'false', 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Enable performance checker?', 'USE_SEO_PERFORMANCE_CHECK', 'false', 'This will cause the code to track all database queries so that its affect on the speed of the page can be determined. Enabling it will cause a small speed loss.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"); $x++; $this->default_config['SEO_REWRITE_TYPE'] = array('DEFAULT' => 'Rewrite', 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Choose URL Rewrite Type', 'SEO_REWRITE_TYPE', 'Rewrite', 'Choose which SEO URL format to use.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''Rewrite''),')"); $x++; $this->default_config['SEO_CHAR_CONVERT_SET'] = array('DEFAULT' => '', 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Enter special character conversions', 'SEO_CHAR_CONVERT_SET', '', 'This setting will convert characters.<br><br>The format <b>MUST</b> be in the form: <b>char=>conv,char2=>conv2</b>', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, NULL)"); $x++; $this->default_config['SEO_REMOVE_ALL_SPEC_CHARS'] = array('DEFAULT' => 'false', 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Remove all non-alphanumeric characters?', 'SEO_REMOVE_ALL_SPEC_CHARS', 'false', 'This will remove all non-letters and non-numbers. This should be handy to remove all special characters with 1 setting.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"); $x++; $this->default_config['SEO_URLS_CACHE_RESET'] = array('DEFAULT' => 'false', 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Reset SEO URLs Cache', 'SEO_URLS_CACHE_RESET', 'false', 'This will reset the cache data for SEO', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), 'tep_reset_cache_data_seo_urls', 'tep_cfg_select_option(array(''reset'', ''false''),')"); $x++; $this->default_config['SEO_URLS_UNINSTALL'] = array('DEFAULT' => 'false', 'QUERY' => "INSERT INTO `configuration` VALUES (NULL, 'Uninstall Ultimate SEO', 'SEO_URLS_DB_UNINSTALL', 'false', 'This will delete all of the entries in the configuration table for SEO', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), 'tep_reset_cache_data_seo_urls', 'tep_cfg_select_option(array(''uninstall'', ''false''),')"); $this->init(); } # end class constructor Similarly, in function install_settings(){ replace the '' value for configuration_group_id with NULL in other words replace: $insert_group = "INSERT INTO `configuration_group` VALUES ('', 'SEO URLs', 'Options for Ultimate SEO URLs by Chemo', '".$next_sort."', '1')"; with $insert_group = "INSERT INTO `configuration_group` VALUES (NULL, 'SEO URLs', 'Options for Ultimate SEO URLs by Chemo', '".$next_sort."', '1')"; Here is the edited version: function install_settings(){ $this->uninstall_settings(); $sort_order_query = "SELECT MAX(sort_order) as max_sort FROM `configuration_group`"; $sort = $this->DB->FetchArray( $this->DB->Query($sort_order_query) ); $next_sort = $sort['max_sort'] + 1; $insert_group = "INSERT INTO `configuration_group` VALUES (NULL, 'SEO URLs', 'Options for Ultimate SEO URLs by Chemo', '".$next_sort."', '1')"; $this->DB->Query($insert_group); $group_id = $this->DB->InsertID(); foreach ($this->default_config as $key => $value){ $sql = str_replace('GROUP_INSERT_ID', $group_id, $value['QUERY']); $this->DB->Query($sql); } $insert_cache_table = "CREATE TABLE `cache` ( `cache_id` varchar(32) NOT NULL default '', `cache_language_id` tinyint(1) NOT NULL default '0', `cache_name` varchar(255) NOT NULL default '', `cache_data` mediumtext NOT NULL, `cache_global` tinyint(1) NOT NULL default '1', `cache_gzip` tinyint(1) NOT NULL default '1', `cache_method` varchar(20) NOT NULL default 'RETURN', `cache_date` datetime NOT NULL, `cache_expires` datetime NOT NULL, PRIMARY KEY (`cache_id`,`cache_language_id`), KEY `cache_id` (`cache_id`), KEY `cache_language_id` (`cache_language_id`), KEY `cache_global` (`cache_global`) ) ;"; $this->DB->Query($insert_cache_table); } # end function Otherwise it is a great module/app. Thanks.
  5. Well using the seo.class.php from Ultimate SEO 2-2.2d-14a was a quick fix. It created the necessary database tables and inserted the required configuration records, then as soon as I restore the latest version of the seo.class.php, and click on any link on the website, the "SEO URLs" link disappears from Admin>Configuration. So apparently the database records are being erased too. One more thing that I noticed, I set the Enable SEO URLs to False from admin, then as soon as I click on any link on the website the Enable SEO URLs is set back to True again. Or when I change the Filter Short Words value from the default 3 to any other number and click on any link on the website then seo.class.php changes the value back to the default 3. So this means the settings cannot be edited since the seo.class.php resets all the settings anytime it is triggered. Not sure what's going on yet
  6. @Jack_mcs and @Smoky Barnable Thank you for your feedback. I will try and share the results.
  7. @Jack_mcs Thanks for your feedback. Interestingly enough, I changed the functions names from what you suggested: function ConnectDB_New(){ global $db_link; $this->link_id = $db_link; }  function ConnectDB(){ back to the original: function ConnectDB(){ global $db_link; $this->link_id = $db_link; }  function ConnectDB_Legacy(){ and I don't get the Fatal Error (Fatal error: Call to undefined method SEO_DataBase::ConnectDB() in /home/.../public_html/includes/classes/seo.class.php on line 78) anymore. However, I still couldn't understand why the SEO settings are not showing in admin. In other words the class SEO_URL_INSTALLER{ is not triggered and the function __construct(){ is not executed. Therefore the SEO records are not being inserted into the configuration table and same applies to the other MySQL entries. I would much appreciate if someone can give me a hint. Thanks in advance.
  8. Yes, I fill like something is not right but didn't have a chance to look into the details. I am using the osC version 2.3.4 with PHP Version: 5.6.30 (Zend: 2.6.0). Meanwhile, I will look at the recent pages to see if I can find your mentioned post and the solution. Thank you.
  9. Great! The previous function actually works fine. Thank you. One more question, based on the instruction I should have the Configuration => SEO URLs within my admin, however, I don't see it. Is this changed too. I just realized it and I haven't looked into the coding yet. Thanks again.
  10. Well I tried again. After all the changes I get the following Error: Fatal error: Call to undefined method SEO_DataBase::ConnectDB() in /home/.../public_html/includes/classes/seo.class.php on line 78 line 78 is the $this->ConnectDB(); within function __construct($host, $user, $db, $pass){ then we have the function ConnectDB() and ConnectDB_Legacy() as follows, but I don't see how is ConnectDB_Legacy() called. function ConnectDB(){ global $db_link; $this->link_id = $db_link; } function ConnectDB_Legacy(){ $this->link_id = mysqli_connect($this->host, $this->user, $this->pass, $this->db); if (!$this->link_id) { die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); } } # end function I checked and see that all four DB variables ($host, $user, $db, $pass) are properly passed. I am not sure what am I missing and would appreciate your feedback. Thanks in advance.
  11. Thanks for the update. I will try it again.
  12. Hello Jack and thanks for the quick reply. The typo is not very important, it is within the docs/index.html file and it looks like the "?" mark within "if ( ! (isset($seo_urls) && is_object(?$seo_urls)) ){" condition is extra. Instead I guess it should be "if ( isset($seo_urls) && !is_object($seo_urls) ){" or maybe I am missing something. As to my request for a link to the full package, maybe I am missing something. However, I have downloaded the files from Ultimate SEO 2-2.2d-17a (1st January 2019), where I can see 3 folders (docs, Upgrade and upload). In docs folder I noticed documents, which frankly I didn't look into assuming that those are documentation for changes down the road. In Upgrade folder there is only the Upgrade_from_V_16 text file. In upload folder I can see 2 more files, which are admin/includes/reset_seo_cache.php and includes/classes/seo.class.php. And what I am looking for is the full package to install the Ultimate SEO from scratch. Thanks again.
  13. Can't find a full Package for a clean install. While some of the most recent updates say "This is a Full package." or "Full package" they only contain couple of updated files. Can anyone please share the link to download the Full Package? Thanks in advance.
  14. Noticed a small typo in docs/index.html file(I assume): // Ultimate SEO URLs v2.2d if ((!defined('SEO_ENABLED')) || (SEO_ENABLED == 'true')) { include_once('includes/classes/seo.class.php'); if ( ! (isset($seo_urls) && is_object(?$seo_urls)) ){ $seo_urls = new SEO_URL($languages_id); } }
  15. @@Dr. Rolex Hello Jonas, No actually I haven't yet. I added the alert(products_id); and I do see that the products_id is being properly recognized and transferred. However, the product is not being deleted from the cart. It looks like the problem is in cartRemoveAction function - frankly I don't see the line where the mySQL delete command is being executed. Thanks!
×