Joomla 2.5 website gone down, any ideas - joomla

one of my sites has gone down this morning. It has been up and running fine for over a year, it is giving the error message:
1146 - Table 'connect2.ilwrn_contentitem_tag_map' doesn't exist SQL=SELECT m.tag_id,t.* FROM ilwrn_contentitem_tag_map AS m INNER JOIN ilwrn_tags AS t ON m.tag_id = t.id WHERE m.type_alias = 'com_content.article' AND m.content_item_id = 35 AND t.published = 1 AND t.access IN (1,1)
The site is: www.connect2recruit.com
Neither the site of the backend are working, had a look around but cannot find anything obvious on the server.
Any help would be appriciated as my client is not very happy.
Regards
Paul

Related

PrestaShopDatabaseException - Unknown column 'cf.show_invoice' in 'field list'

After migrating a prestashop 1.7 from one server to another, quite everything works fine.
Ordering / paying is ok
Order displays for the customer and the shop-owner.
But when clicking on the order to view the details, there is a big failure with messages =
SELECT fd., cfl., cf.type, cf.show_invoice FROM is_velsof_supercheckout_fields_data fd JOIN is_velsof_supercheckout_custom_fields_lang cfl ON fd.id_velsof_supercheckout_custom_fields = cfl.id_velsof_supercheckout_custom_fields JOIN is_velsof_supercheckout_custom_fields cf ON cf.id_velsof_supercheckout_custom_fields = cfl.id_velsof_supercheckout_custom_fields WHERE id_order = "3059" AND cfl.id_lang = "1"
at line 769 in file classes/db/Db.php
https://snipboard.io/tOELSc.jpg
Does anyone have a clue about this please ?
PS : the 6 mysql tables used by supercheckout are the same between old server and new server
The error is quite clear,
a module query is looking for a field that is not present in the DB.
Check in your DB that the table "is_velsof_supercheckout_custom_fields" contains the field "show_invoice".
If the module version on the "new" server is different from the one on the old server, make sure the module upgrade procedure has been triggered, maybe some new field had been added in a recent version.

GOOGLE sheet ImportHTML for calculating Dividend History

I am trying to import Dividend data of a stock into a google sheet but I am getting error stating that could not fetch URL but if I tried to connect to the NASDAQ website manually then its working perfectly. I am not sure what's causing this issue.
Your help is highly appreciated.
Query Used
=QUERY(IMPORTHTML("https://www.nasdaq.com/symbol/aapl/dividend-history", "table", 3), "select Col3")
Error
Could not fetch url: https://www.nasdaq.com/symbol/aapl/dividend-history
This may be a bug
This looks like it may be a issue on Google's side:
https://issuetracker.google.com/175144626
There has not been any resolution, but go and star that issue if it affects you or you want updates.
I found that string but it doesn't work either:
=QUERY(IMPORTXML(CONCATENATE("https://www.nasdaq.com/market-activity/stocks/"&A2&"/dividend-history");"//tbody//tr[1]"); "select Col1, Col3 LIMIT 1")
It should return the Ex-Div Date and the next quarterly Dividend amount.

SSRS Matrix - Sorting rows by a specific column

Can somebody explain me how to properly sort "[Arrivals] group" by Count(SearchDate)] for particular "Departure" in this Matrix?
I tried this fx in Row Group Sorting Properities, but it didn't work.
[Count(SearchDate)]
Then I tried specify which column I would like to sort, but same problem.
=Count(IIF(Fields!Departures.Value = "PRG", 1, 0))
After deeper inspection I found that I am able to sort "[Arrivals] group" only by [Count(SearchDate)] but not grouped for particular "Departure".
After a advice in MSDN forum I tried this fx:
=IIF(Fields!Departures.Value = "PRG", Count(Fields!SearchDate.Value), 0)
In first view result looks good but only for the first couple of records.
When I tried pivot table in SQL server everything looks fine:
SELECT * FROM (SELECT Arrivals, Departures, SearchDate FROM Destination WHERE SearchDate > '2016-03-01T00:00:00' AND SearchDate < '2016-03-28T14:03:46') as a
PIVOT (COUNT(SearchDate) for Departures in (PRG, LON)) as PivotTable
Order by PRG Desc
I spent a lot of time and tried a lot of solution but I have realy no idea how to solve it.
Thank you very much for your help, Petr.
I faced the same problem before. Try using this expression:
=COUNT(
IIF(
Fields!Departures.Value="PRG",
COUNT(Fields!SearchDate.Value),
Nothing
)
)
It could be a pain since depending on the dataset number of rows it increases the report processing time causing poor performance, it works though.
Let me know if this helps.

SonarQube doesn't store all results in the database?

I am aware I should not use the database directly from SonarQube, but this is a one-shot complex thing, and saves me days if I can do it directly from the database.
I need to know the amount of classes per project, where the amount of lines is less than 200. So far no problem creating this in SQL.
Only problem I have: for 2 projects, this information isn't stored at all in the database! In the GUI from SonarQube I can see this measure for each file, but than in the database these files have only 1 measures stored (technical debt).
My guess is that for some strange reasons these measures are calculated on the fly for this project? Could that be? And is there a way to force SonarQube to store proejct measures for each file in the database? I tried with the sonar.analysis.mode=analysis parameter but that didn't work?
Thanks a lot and regards,
Pieter
it was due to the query. this is the right query
SELECT metrics.description, root.name, COUNT(project_measures.metric_id) AS AmountOfFiles,
SUM(CASE WHEN project_measures.value < 200 THEN 1 ELSE 0 END) Less200,
SUM(CASE WHEN ((project_measures.value >= 200) AND (project_measures.value <= 1000)) THEN 1 ELSE 0 END) Between200And1000,
SUM(CASE WHEN project_measures.value > 1000 THEN 1 ELSE 0 END) More1000
FROM project_measures
INNER JOIN metrics on project_measures.metric_id = metrics.id
INNER JOIN snapshots on project_measures.snapshot_id = snapshots.id
INNER JOIN projects root on snapshots.root_project_id = root.id
WHERE metrics.id = '1' /*Line: code lines + comments + blanc lines*/
and root.scope = 'PRJ' /*projects*/
and snapshots.scope = 'FIL'
and root.name like '%' /* '%' to show all projects*/
GROUP BY root.name
I am a little bit confused by your question. Are you saying that, when using your SQL queries, you have the results correct for all but 2 projects, whose metrics appear in the SonarQube dashboard?
I suppose the problem cannot come from your SQL queries?
Have you been running these 2 projects recently?
Try clearing your browser cache?
Regards.

magento url rewrite useless?

Two points I want to mention.
First Point.
I noticed a strange behavior, most probably a bug.
I configured a new clean instance of Magento (no other module, so from scratch) and an empty database.
I created 3 categories below the root one.
And 3 products, one in each category.
Something like:
Cat 1
+ Prod 1
Cat 2
+ Prod 2
Cat 3
+ Prod 3
If I change the order of the category so "Cat 3" is before "Cat 2" like this:
Cat 1
+ Prod 1
Cat 3
+ Prod 3
Cat 2
+ Prod 2
I just need to drag and drop "Cat 3" above "cat 2" from the category management screen.
So the "order" number of cat2 and cat3 are actually exchanged.
BUT the url index process reindexes ALL products of ALL categories (URL REWRITE index)!
I analyzed the SQL log, and it actually does an INSERT with every single product in the database.
I see insert in core_url_rewrite for "Prod 1", "Prod 2" and "Prod 3".
This is a bug, because "Cat 3" keeps the same parent category, so:
1) there is no need to rewrite products within "Cat 3" (the product name didn 't change, the category name didn't change!!)
2) there is no need to rewrite products linked to other categories
Actually, by doing a select, I can see that the rows of the core_url_rewrite table are the same (for sure as no name changed! and no association between products and any categories above the products changed!)
Here is one SQL query that I see out of the log file wen I move the category:
SQL: INSERT INTO `core_url_rewrite` (`store_id`,`category_id`,`product_id`,`id_path`,`request_path`,`target_path`,`is_system`) VALUES (?, ?, ?, ?, ?, ?, ?) ON DUPLICATE KEY UPDATE store_id = VALUES(`store_id`), category_id = VALUES(`category_id`), product_id = VALUES(`product_id`), id_path = VALUES(`id_path`), request_path = VALUES(`request_path`), target_path = VALUES(`target_path`), is_system = VALUES(`is_system`)
BIND: array (
0 => '1',
1 => NULL,
2 => '4',
3 => 'product/4',
4 => 'testun.html',
5 => 'catalog/product/view/id/4',
6 => 1,
)
AFF: 0
TIME: 0.0005
Actually, the worse thing is, it does an insert of a row that already exist, so it actually does not insert anything. The insert failed (you can see "AFF: 0" meaning nothing has been inserted)
It is a waste of time to process each product for nothing, and try to insert something that might be already there!!
Second points
I found another bug/strange behavior.
If I have 2 products with the same name (it can happen), then the url key is the same (by default).
BTW url key is also the same by default when you duplicate a product to create a new one.
So The reindex process becomes crazy.
eg, 2 products with the name "camera" will have the url rewrting like this:
camera-1.html
camera-2.html
I'm ok with this.
BUT, if now I reindex everything, it becomes crazy.
it will change the url rewriting of those products (even if I didn't change anything related to those products).
it will update the 2 products like this:
UPDATE camera-1.html => camera-3.html
UPDATE camera-2.html => camera-4.html
and insert redirection if the setting is enabled (so previous links are not lost), somethign like
INSERT camera-1.html , camera-3.html ,RP
INSERT camera-2.html , camera-4.html , RP
RP options is about permanent redirect.
So 2 useless updates and 2 useless Insert for nothing.
If I reindex again, I wait the end, and reindex immediately, then Magento does 4 updates, 4 inserts etc.
Why?? No change at all with any data between the reindex :-)
If you have 5 000 products with the same name (like I have), then it's 10 000 updates and 10 000 (real) insert for nothing...
Size of core_url_rewrite increase again and again on a daily basis. Suration is extremely high
Note: I have a good reason to have 5 000 products with exactly the same name :-)
Whatever my reason this looks strange.
Have you already checked this?
Quite easy to check with a fresh installation of magento and log files enabled.
Last thing is, why do we need the core_url_rewrite table?
This is one of the main cause of performance issue with magento!
4 lines of php code+htaccess url rewrite would do exactly the same job, no need of a DB Table for this (except for custom url rewrite or CMS page).
one method to generate dynamically the url of a product (based on name and category if needed) and one to generate the url of a category.
then htaccess to redirect.
you just need a keyword in the url to know whether it is a link to a product or a category, and its ID.
something like:
my-cat/camera-112-p.html
htacces URL rewrite detects it's a link to a product (because of -p.htm), it gets the product id out of the url (112) and redirect the user accordingly.
having the product ID might looks ugly or an issue with SEO, but I don't think so (not as bad as you can read).
And it has to be balanced with the big benefit:
1) no huge table anymore
2) no need to reindex this table (this takes hours, like 8 hours, with a lot of magento website). This process can cause a lot of timeout issue, locking etc.
at least this should be possible through an option (or a module).
Note also that you don't even need to care about permanent redirection, since the content (text) within the link does not matter! Just the ID matters.
Does it exist? if yes I will definetely buy it to say "bye-bye" to this complex messy mechanism (with bugs)
any feedback will be hight appreciated.
(especially if you find any rational in the way magento behaves, taken into account the poor performance linked to use/manage this table, so the rationnal has to be highly appreciated :-) )
thanks
Rod
Point one and two seem to have been addressed see the notes for EE 1.13.0.2 (released today, CE 1.7 coming soon): http://www.magentocommerce.com/knowledge-base/entry/ee113-later-release-notes#prod-url-unique
But, it's worth addressing some of your points.
Why do/did URL rewrites work this way? Because that's the way they worked - it's just how they were created/evolved, including the racing rewrite bug you noticed when two products have the same url_key.
Based on a lot of benchmarking and experience, I can state that the core_url_rewrite table is not "the main cause of poor performance in Magento". The reindex process can suck though, no doubt.
The URL rewrite table is necessary for custom rewrites in general. Suggesting that manipulation of server config files (e.g. Apache .htaccess) to add rewrites fails to consider that Magento is an application which can be modified and extended without direct developer knowledge (e.g. by store owner).
The suggestion to use a pretty-urls mod_rewrite pattern is not tenable for any shop concerned with SEO, and I assure you that the URL path is quite important to ranking/relevance.

Resources