NO INDEX KEY COULD BE USED on Joomla - joomla

I'm using joomla 3.5. After the installation I turned on Debug mode, but there are many "NO INDEX KEY COULD BE USED" messages shown. This is effect to other functionality such as can't remove category, user or other module.
Error Image.
NO INDEX KEY COULD BE USED
(Environment:MySQL 5.5.28 , Php 5.3.28, Apache 2.2.23)

For every table in your database there can be indexes (this is optional) that will improve the performance of certain SELECT queries on that table. The warning that you see when you turn on debug mode in Joomla is that the query mentioned would benefit from an index.
Normally the Joomla or 3rd party developers should do this. The debug mode is used by the developers to find these kind of problems.
To be clear, nothing is going wrong when you see this message. It's only an indication for developers that improvements can be made.

Related

How can I limit wagtail's site history by site to support multi-tenancy?

I have a multi-tenant wagtail set up and we are currently working on getting up to date. We've just recently upgraded to v2.15 which introduced audit logging for all models instead of just page models.
AFAICT from looking through the wagtail code, the changes for a page model are only visible to superusers or admins with can_add_subpage or can_edit permissions which seems to effectively support multi-tenancy.
However, for all the other models there is no limitation put into effect. This means that an admin for Site A is seeing when changes are made to Site B or anytime a user is added or edited. We are using email addresses as usernames so this presents a rather major privacy issue.
This method hasn't been updated in any newer version, AFAICT, so I don't believe that just upgrading will fix this.
Does anyone have any ideas on either any wagtail settings we can change to keep Site and user changes invisible to non superusers or how we might localize BaseLogEntryManager.viewable_by_user so we can override the default wagtail implementation to our needs?
We have previously done something somewhat similar with the search available to admins by creating our own src/app/templates/wagtailadmin/pages/search.html and creating our own local version of https://github.com/wagtail/wagtail/blob/stable/2.13.x/wagtail/admin/views/pages/search.py
I had thought about trying to do something similar here however that doesn't seem like a good thing to do given how different those circumstances are and I think it was only possible using the register_admin_search_area hook.
I run a fairly large multitenanted Wagtail site. I have made public gist of the code we use in Wagtail 2.16 to restrict reports.
One of the main things we had to patch is the filters on the reports page. We do not want users on one site to even know there are other users in the system. This is implemented in the site_specific_get_users_for_filter method.
Although our non-page models all have site_ids, it was not possible to filter ModelLogEntries in site, so we settled for hiding that report from everyone except superusers.

Kibana 4.3: How do load visualization only after a filter is applied?

[Background]
I have a dashboard which logs performance of my application for
multiple versions.
[Query]
Need to load a specific visualization(say line graph) only when a
filter of 'version:1.1' is applied.
[Additional Info]
The reason behind this is when no version is selected, it loads all the samples of all the version which is messy and the data is unreadable.
I cannot add that as a filter before hand because I don't know which version the user would want to analyse.
Also, I want to avoid another hyperlink which re-directs to a new page.[If this is possible, please share as I am not sure, how would I force user to select app version before moving to that page]
P.S.: Please let me know if I am not making sense here.

Oracle ADF 11.1.1.4 blind query triggered

I am working/maintaining an application built on Oracle ADF 11.1.1.4 version migrated from 10g during developement phase itself. We are using BC4j to talk to Oracle 10g database. The application is very heavily data centric and so there are chances that the query triggered through GUI may be have bad plan based on the search criteria entered by the user. Most of the places we have marked few fields mandatory to search on where potentially we see a bad query to be formed.
Issue: Currently in production user open muliple tabs for different screens, one of which is a screen where we have made it mandatory to enter few search values before searching/Querying the data. In the corresponding view criteria of that View Object we have marked those fields as selective required. But somehow we see a blind query triggered even when user hasn't clicked on search button on that page
It seems to comeup when the session expires on one of the pages opened and user clicks the OK. button
I am not sure is the framework triggereing some blind query when the page expires or else. There are many listeners on the page, but I am not sure why session timeeout can cause it.THe query is the same as that in the corresponding VO where we have maked few fields as selectively required. The long running query causes stuck thread on Weblogic server causing it to crash eventually after sometime.
Kindly anybody please advise if there has been an Oracle bug reported or any solution. We are seeing this on couple of pages where view criteria has few fields marked as selectively required.
Thanks
#Edit: The pages either jspx or page fragments jsff
You might be running into an effect as described here http://andrejusb.blogspot.ca/2012/08/adf-bc-passivationactivation-and-sql.html?m=1
You can try the technique I showed here https://tompeez.wordpress.com/2012/03/18/jdeveloper-preventing-return-of-large-row-sets-on-page-load-of-vo-using-bind-variable/ to prevent executing of queues on first load.

Magento custom fields on checkout

Is there any tutorial available for how do i add custom fields on front end check out step like PO number,Job name , customer comments etc as well as in admin->create->order.
My usual motto is to find (and buy if needed) a module that already has the functionality you seek. Especially when the life of this project involves version upgrades because then you can seek a pre-packaged solution from the provider.
I regret every bit of custom code I have added to our Magento install. Because now I've got to maintain the site to just keep working in addition to figuring out my hacks. Time to devote more time to replacing hacks with off-the-shelf extensions, which would have been much faster in the first place.
I know this attitude goes somewhat against the stack overflow thinking of I can do anything, but really, Magento's job is to enable someone to do less work.
Two years later, an update: after the gentle poke of a downvote (probably for appearing to shrug off the question), I am back to revisit and share some of what I've learned. The programming aspect of additional fields is the concept of persistence of the data.
If you're ok with the custom fields only appearing in the transactional emails following the order, then the task is as "simple" as adding the fields to the form somewhere and then updating the controller to to catch and insert the post data into the email. You can use a custom variable in the back end to readily expose this to the email templates. And a Magento SE on programatically creating a custom variable.
Getting persistence into the back end requires adding database fields via an installer in your module. The iCoreThink blog lays out the steps clearly and explains why, how to confirm your work, and then provides real-world implementation, like displaying to the customer in their account. The "other blog" mentioned below has a great example of this, though his example is specifically related to billing and shipping.
Resources from my upvotes and bookmarks:
» This iCoreThink blog post is my favorite reference so far and what I'm following now.
» I was using Templates Master's FireCheckout which includes their own checkoutfields module, but I've abandoned their single view checkout for the flow of Magento's one page checkout. I'm now trying to adapt their checkout fields (and use their controller) into my template for checkout.
» I thought for sure Alan Storm wrote an article about Checkout custom fields, but I don't see one.
» This Magento SE lists a couple blogs and a paid extension. The excellence blog is ok, but his style is too rote for me and I don't learn anything. The other blog discusses the procedure for building your module and installing the database fields.
» The unexpected-IT blog demonstrates and informal hack to add the code to core files (but sadly doesn't show how to override those files by copying them to app/code/local) and the steps to manually perform to get the column and fields added in the database. Apparently is perfect for 1.4 and below, but comments seem to explain what to do for 1.5 and up.
This last hack-ish change is my personal favorite as it seamlessly adds the extra bits into existing Magento admin pages and "feels like" less work. Caveats: I wouldn't do this without using version control and it will absolutely break if any core code changes happen between version upgrades.

can the asp page be auto refreshed trigger by database change using sqlCacheDependency

I've spent 2 whole weeks in googling some working sample on this. I was almost kind of knocking my head against concrete wall....deeply suffering until now.
Ok, I have a simple web page to display two columns, say, Msg & MsgID, from a table named MsgLog in MS SQL Server. I have stored procedure that will insert new Msg entries into the table. (in future, possibly could update existing entries)
My desire is, whenever there is a new msg entry inserted, or an existing msg entry got updated, the web page must automatically reflect this change without user clicking any page button, or without any coded timer function, otherwise the web page just leave as it is. The page refresh can only be triggered by database table change.
I read lots of internet posts regarding using SqlCacheDependency to achieve this, but none provides complete steps and codes. I tried to tweak their sample codes in my project, but none of work successfully, as I predicted. Or is it impossible to implement this?
My development environment is: Visual Studio 2010 professional, using ASP.NET FRAMEWORK 4.0, MVC 3 application using C# with embedded sql statements with SqlCommand object, database is MS SQL Server 2008 enterprise editon, IIS express.
Can someone genius to show me complete workable detailed steps from sql server setting, to coding. Functionality is just as simple as display rows with 2 columns from one table in a web page, and reflect changes realtime if and only if the table got updated or inserted. Not using polling or timer techniques; Not using LINQ to SQL, but using SqlCommand.
thanks millions of thousannds.
This in itself doesn't have to do directly with SqlCacheDependency.
You are wanting to do something that until only recently was really done with timers/polling unless you were one of the big players (ie google chat) Once your server notification event is raised then use SignalR to notify the clients of the change, so it requires an 'open' connection. Otherwise polling/refreshing is your only option. I haven't used SignalR, but I do know its really your only option now to do what you want. There have been some other projects in this field, but this is your best bet by far.
https://github.com/SignalR/SignalR

Resources