DotNetNuke module missing from page - dotnetnuke

I have a a strange problem with nuke modules i've been developing for a nuke 4.8.4 site.
I have one module that just refuses to allow another module to be placed BELOW it in the same pane. Everything loads fine as long as it is the last module in the pane, but if you move it above the other modules, the others won't load.
I originally thought that it was something odd in the markup of the module causing it to layer over the others - but when I view source on the page, the other modules don't even exist in the source.
Has anyone seen this issue before, and if so, how did you fix the problem?
EDIT:
We've built a dozen modules - and ONE module does this on my machine, but a DIFFERENT module does this on another developer's machine. On each machine, the module that is broken for one dev works fine for the other.
Another interesting thing that we've noticed is that in the case where ONE of these modules is on a page, the GetTabModules will return 2 rows for the one module, both with the same ModuleID.

This sometimes happens to us, especially on older sites, AND especially if there is a long history, possibly with the recycling bin filled with old/deleted modules. It will seem that we keep trying to move a module UP or TOP and it won't move compared to the others.
The problem is easy to see if you look at the database and can see that the Module_Tab record involved has the same sort order number as other modules on the page, OR that it has a null value and adding a +1 or -1 to NULL still returns NULL !
So for us the answer is always to perform the following steps to clear out your issues (and this can be done without accessing the database):
Empty the recycling bin, and then come back to the page
Move all of the modules out of the pane that they're in... so if they are all in the Content Pane, move them to a left or footer pane.
Then, IN ORDER that you want to see them on the page, add each one back to the Content Pane, one at a time.
This process makes their sort order clear/irrelevant and then adding each module back in starts a new ordering number from 1 to 2, etc and after that, all modules will work properly with the normal Up / Down move actions.

It sounds like your module code is blowing up DNN. I'd run the site with a debugger attached and step through the code that is instantiating the modules.

We uninstalled & reinstalled the offending modules, and they work fine now. Must have been some sort of bug in the install process. I'm going to upgrade to 4.9.2 and see if we run into similar issues there.

Related

Build solution fails because of linker errors on newly added projects

I have a solution in VS 2015 which makes use of multiple similar projects.
I added two new ones from a provided template and now building the entire solution shows two linker errors on those two projects.
I have compared configuration with other similar projects within the solution and everything was exactly the same. Building the projects one by one is successful.
At the Linker properties-> Input-> Additional dependencies I have the following libraries, created from other projects within the solution:
CommonLib.lib;UsermodeLibrary.lib
And the linker error I get is either:
Error LNK1181 cannot open input file 'CommonLib.lib' ProjectName
Or:
Error LNK1181 cannot open input file 'UsermodeLibrary.lib' ProjectName
I put the projects in the same folder as the others, and the solution makes use of filters.
My lab teacher figured this out for me.
For the sake of the answer let's call the new project I added from template "MyProject".
"You have to go the properties of the solution (right click on the solution -> Properties), there you go in the left tab to Common Properties\Project Dependencies.
After that you choose at the middle top of your projects (ex.: MyProject) and in the bottom window, you have to search for UsermodeLibrary and check/select it as a dependency for the project.
The thing is that every project is configured OK in the Project Properties (linker related and the rest), the only problem is that when you are building the solution it has to know per solution that some projects depend on other projects.
Here the dependency hierarchy is the following:
MyProject -> UsermodeLibrary -> CommonLib (-> means "depends on").
That's why you are seeing that CommonLib can't be linked to the project because it is not built before those applications.
Somehow, your templates miss this setup in regard to the Solution in which they are created."

The Babel-core module not working with Lingui

I am new to the concept of Localizing my react-application. After doing some research online, It seems as if jsLingui is the best library to use and implement translation on my React application. Following tutorials from https://lingui.js.org/tutorials/react.html , everything seems pretty straight forward. but when I run the command
$ lingui extract , I get the error :
module.js:557
throw err;
Error: Cannot find module 'babel-core'
at Function.Module._resolveFilename (module.js:555:15)
at Function.Module._load (module.js:482:25) .....
I have tried re-installing the babel-core , and it shows installed. Even when I check on my file system, I see the folder as node_modules/babel-core .
I also checked my package.json and I see "babel-core": "^6.26.3" as part of my devDependencies. Please any ideas around this will be helpful.
Beside, the pressing question, I also have a few other questions;
1) In the documentation, I am not sure on where to keep .babelrc file created. I hope it is suppose to be inside my babel-core folder.
2) When I was reading on the jslingui library, I discover that, they are still working on something that will help separate translations to be done page by page. I do not know whether this task is completed or still under development because, I am really interested in this one since my application really big and loading the whole translation at all times might become a real issue.
3) What if I have text in one part of my application which is exactly the same as in another part of my application, is it possible to write it in one section and call the id in another part to give me back the information?? or it is out of scope of the library .
4) I am building a social platform therefore I have information coming from the DB, which I do not know the content therefore such information can not be translated using jslingui just as it is. I will like to introduce some translation to this information( similar to what is happening on Facebook). I know this task needs some serious Artificial intelligence in the areas of natural language processing and machine learning. Please, Any good library that I can use to help my application translate only the portions of data provided to it( definitely information coming from DB)??. I have tried googling on this but I got nothing concrete( NB: I do not want Google Translate because, It will help to translate the whole page + names etc) which will mess-up the user experience of my application
jslingui
Thanks
I have tried re-installing the babel-core , and it shows installed. Even when I check on my file system, I see the folder as node_modules/babel-core . I also checked my package.json and I see "babel-core": "^6.26.3" as part of my devDependencies. Please any ideas around this will be helpful.
If you've installed #lingui/cli globally, please remove it and reinstall locally. If you use Babel 7 (your plugins/preset start with #babel/), then you need to install babel-core#^7.0.0-bridge.0 and #babel/core. Both locally as devDependencies. What also helped in some cases is good old turn it off and on again: rm -rf node_modules and reinstall everything...
1) In the documentation, I am not sure on where to keep .babelrc file created. I hope it is suppose to be inside my babel-core folder.
You should keep it in the root of your repository (next to package.json) unless you have specific needs.
2) When I was reading on the jslingui library, I discover that, they are still working on something that will help separate translations to be done page by page. I do not know whether this task is completed or still under development
It's still under development. However, it's a bit different - it helps you create separate message files, but not automatically. That's something we need to solve in further versinons.
3) What if I have text in one part of my application which is exactly the same as in another part of my application, is it possible to write it in one section and call the id in another part to give me back the information?
You have two options. Either you're using generated message IDs:
// App.js
<Trans>Hello World</Trans>
// Component.js uses the same message
<Trans>Hello World</Trans>
In this case, you only need to translate Hello World once, because messages are grouped when collected from source files.
Other option is that you're using custom IDs:
// App.js - define message
<Trans id="msg.hello">Hello World</Trans>
// Component.js - use message
<Trans id="msg.hello" />
4) I am building a social platform therefore I have information coming from the DB, which I do not know the content therefore such information can not be translated using jslingui just as it is. ...
I can't recommend any approach here, but it seems you need to use a machine translation. Either Google Translate or a better one, if you manage to find it. My guess it'll be either low-quality or expensive because as you said, this isn't a trivial task.

Module data not copied when duplicating pages

I get some DNN 9 modules developed. They are Slider and FAQ for example.
When I try to duplicate a page, only these modules data is copied and I had to copy it again. Can you please tell me what elements need to be adjusted so data is copied as developer now telling me big stories that there is so much work involved in it?
thanks,
-Naveed
When duplicating a DNN page, if you want the same module content to be "shared" between the two pages - You must add the modules as a "Reference":
This example above is for DNN9 - But the same logic applies for older versions, the interface is just slightly different.
If you now edit one of these modules on a duplicated page, the same changes will also be applied on the original page - As well as other "reference copies"

Google App Engine modules no datastore access

I have a project consisting of three modules, where the default and one of the background task modules are operating as expected.
My third module have the following weird behaviours:
No access to the shared data store or memcache.
When a task is scheduled in the default queue and should be picked up by the third module, a 404 is returned. When the same task is called manually via a browser it works fine.
It appears to be a lack of access to the shared services, but they are working so I'm pretty confused.. Have anyone come across a similar problem before?
Never seen this before, but here are a few ideas: you can try changing the module's version number and uploading it again, also dont forget to make it default. I have also run into problems with one of my modules consistently crashing due to low memory, you can try to change it to a beefier machine.
Problem was a combination of me being silly (was not reading in query parameters correctly) and a slight lack of documentation on Google's part - Task Queue tasks does not honor dispatch.xml meaning that you'll need to set up a separate queue for each module

When magento widgets are run for the first time do they alter the database?

I've been following this tutorial http://www.magentocommerce.com/knowledge-base/entry/tutorial-creating-a-magento-widget-part-1 to create a Magento widget as part of an extension I'm working on.
Whilst the widget was created successfully and worked as I wanted it, I changed the code and started getting the following error
Warning: Invalid argument supplied for foreach() in app/code/core/Mage/Widget/Model/Widget/Instance.php on line 502
When I changed the code back, the error was still present. However when I copied all my module to a fresh Magento install then the error wouldn't appear.
Although my widget does not explicitly use the database does anyone know if the act of installing and uninstalling a Magento widget makes changes to the core databases tables and if it does, which tables are altered.
Thanks
The core_resource table contains a list of all modules, so adding a new module will cause a new row to be created.
If you have anything in your module's sql folder, that code will be run depending on your module's version.
Without knowing exactly what code was run and changed, it's hard to know what your specific problem is.
http://www.magentocommerce.com/knowledge-base/entry/magento-for-dev-part-6-magento-setup-resources
So if you followed that tutorial you linked to I do not think it changed any database settings.
You can tell if a module will add tables or modify table columns by the following method.
Assume the module is called Foo_Bar and it is installed in the "community" code pool (as opposed to core or local).
Navigate to app/code/community/Foo/Bar. You will at minimum usually see etc and Block directories there.
If you see a sql directory then this module makes db changes. You also need to understand a module is versioned and may initially make a certain table and then modify it.
By way of example you can go to any core module and look for the same. For example I am running Enterprise 1.12 and went to:
app/code/core/Mage/Sendfriend/sql/sendfriend_setup
I see:
mysql4-upgrade-1.5.9.9-1.6.0.0.php
mysql4-upgrade-0.7.3-0.7.4.php
mysql4-upgrade-0.7.2-0.7.3.php
mysql4-upgrade-0.7.1-0.7.2.php
mysql4-install-0.7.0.php
install-1.6.0.0.php
Note the upgrade x-y nomenclature. That is what core_resource keeps track of.
If you are wondering where your new module's settings are saved, that is actually in core_config_data. try this:
SELECT * FROM core_config_data where path like '%foo%';
Assuming you have some setting in the admin you named "foo".
Now back to your problem. That is a common php error. You are running a foreach on something which can not be iterated. The code right before that is probably not returning an array or collection or whatever.
Ideally you should always wrap the foreach with a statement that checks that the item you are iterating over is not empty.
You can also turn off displaying errors or suppress that error using the # statement which is a bad practice...

Resources